Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Copy to command with spaces
Message
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Environment versions
Visual FoxPro:
VFP 9 SP2
OS:
Windows Server 2008
Network:
Windows 2008 Server
Database:
Visual FoxPro
Application:
Desktop
Miscellaneous
Thread ID:
01465413
Message ID:
01465416
Views:
50
>hi all,
>I am copying files from a clipboard to a location in a folder (thanks sergy). However when the source files have a space in them I cannot copy them. I take out all of the spaces for the destination file but I dno't know how to deal with the spaces on the source file. the pertinent code is below. mfilefrom will be something like "letter to customer about overdue accounts.doc" and the mfilenameandloc will have a full directory listing "K:\..." all with no spaces and then "lettertocustomeraboutoverdueaccounts.doc". If i use source files wihtout spaces it works so i think it's the space in the source that is the problem.
>
>mruncode = "COPY FILE " + mfilefrom  + " TO " + mfilenameandloc
>&mruncode
>
>~M

You don't need macro here. You can use name expression
Copy file (mFileFrom) to (mFileNameAndLoc)
Take a look also Message ID: 1448888

to preserve the casing.
If it's not broken, fix it until it is.


My Blog
Previous
Reply
Map
View

Click here to load this message in the networking platform