Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Copy file dont work with spaces in the path
Message
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Miscellaneous
Thread ID:
00482918
Message ID:
00484163
Views:
14
>hi to all:
>I'm attempt to use the copy file command with a macro substitution for the origin and target full paths and when the full path string contain spaces, the copy file command doesn't work.
>It launch a syntax error.
>I try to set default to getdir() and copy file with the filename only (without the full path), but in this case the copy file command launch a syntax error too when the file name string contains an space.
>So paths as "c:\my documents\my pictures\" don't work...
>Anybody can help me to solve this issue?
>Thanks
>Pedro

You can also use name substitution instead of macros:

yourfilename = "c:\my documents\my pictures\picture1.jpg"
newname = "c:\my new pictures\newpicture.jpg"
COPY FILE (yourfilename) TO (newname)
Fred
Microsoft Visual FoxPro MVP

foxcentral.net
Previous
Reply
Map
View

Click here to load this message in the networking platform