Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Path name
Message
From
20/06/2000 17:30:01
 
 
General information
Forum:
Visual FoxPro
Category:
Troubleshooting
Title:
Miscellaneous
Thread ID:
00371272
Message ID:
00382428
Views:
27
>>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
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform