Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Path name
Message
De
20/06/2000 17:30:01
 
 
À
21/05/2000 10:57:59
Information générale
Forum:
Visual FoxPro
Catégorie:
Problèmes
Titre:
Divers
Thread ID:
00371272
Message ID:
00382428
Vues:
26
>>Hi all,
>>
>>Is there a way in which i can use short path names instead of long path names throught justpath().
>>
>
>In the FAQ there's sample code that will use the Win32 API to convert a long name to a short name under Win32 and Other APIs. Alternbatively, you can use the Scripting.FileSystemObject's File or Folder subobject - both have a short name available as a member property.
>
>>That is, assume i have a folder called "FLD Caption" , this in DOS mode, would be "FLDCAP~1"
>>When i go thro justpath() , it shows "FLD CAPTION" and hence it is impossible to try and copy any files from this folder at runtime. This is cause it encounters a space between FLD and CAPTION, it considers it as invalid command.
>>
>>How do i get around this.
>>
>>Dinesh

If you put the path between " ", you should have no problem. If you use variables in the copy file command, add " " in the variable too.

This will not work :

dest = "c:\program files\test.txt"
copy file test.txt to &dest

But this will :

dest = '"c:\program files\test.txt"'
copy file test.txt to &dest

Remember you can use [ ], ' ' or " " as string start and end symbols.

Marc
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform