Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Better way to copy files
Message
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Miscellaneous
Thread ID:
00616676
Message ID:
00616688
Views:
24
>I'm writing a backup program and need to be able to copy files from within VFP7. Using COPY FILE (filevar1) TO (filevar2) is giving me a headache. Sometimes it works, sometimes it says "Not a character expression". I've tried adding quotes around it like ["]+ (filevar1) + ["] in case it's an issue with spaces in the file name, but it doesn't like that, either. Is there a better way of doing this? I searched the help, but didn't see another command for it. Any ideas?
>
>Thanks,
>
>Michelle

Try
["]+ ALLTRIM(filevar1) + ["]

That can help if you have trailing spaces at the end of filevar1 when using quotes.
If we exchange an apple, we both get an apple.
But if we exchange an idea, we both get 2 ideas, cool...


Gérald Santerre
Independant programmer - internet or intranet stuff - always looking for contracts big or small :)
http://www.siteintranet.qc.ca
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform