Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Better way to copy files
Message
From
07/02/2002 12:14:07
 
 
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Miscellaneous
Thread ID:
00616676
Message ID:
00616737
Views:
25
>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

Michelle,

Don't know what you're really after.

In case you want to copy whole directories and subdirectories, there's a download of mine (#1554Folder-and-File related API-based functions) which I can recommend (LOL).

The FolderCopy(FolderFrom, FolderTo) is 'smart', ie if the file already exists and both the size and date have not changed, it does not copy at all.

I use it often to restore the database to an older state, and to back up my work to CD-RW

There are also a couple of other functions(FolderMove, FolderRemove, adir_) and definitions of API functions (like CopyFile)

The whole includes a thermomether with TimeElapsed, TimeLeft, Progress and Progress/sec

Suggest you have a look at it.
Gregory
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform