Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Copying files and reading directories
Message
From
11/02/2002 16:40:17
 
 
General information
Forum:
Visual FoxPro
Category:
Windows API functions
Miscellaneous
Thread ID:
00617463
Message ID:
00618584
Views:
26
That's definitely much more. I'm glad I stuck with the SHFileOperation since I use a bunch of that. This is my first foray into the API, so I was rather confused when I posted that. I've since got it working the way I want it now except for a couple things. If I send a huge list of files to be copied, and there are a few of them that it wasn't able to copy, is there a way to find out what they are and what the problem was? Something silently returned to me, not stopping to ask the user.

Also, I like that I can use the built in progress indicator. The main problem is that since I can only send it 32k worth of files at a time, I have to have multiple copy calls and end up with the progress indicator starting over a few times. Is there a way around that? If not, I can live with it, but it would be nice if I could avoid it just because it looks weird.

Thanks for your answer, and the paper on it. Your example was a big help.

Michelle


>SHFileOperation() will do considerably more than CopyFile() - it allows the specification of multiple source file masks, multiple target directories, overwrite behaviors, recovery from errors encountered in the execution, the display of the Windows dialog and animations and recursion of subfolders when copying. It supports undo operations and confirmation dialogs. It also will handle Delete, Move and Rename functions. It supports collision prevention (rename files when the file currently exists in the target directory.) It will perform a copy when the file is open as long as it is shared and no write locks have been issued. It will work without having the WSH installed, as long as the necessary Shell version has been installed.
>
>IOW, the two are not the same - SHFileOperation() offers support for the functions done by CopyFile(), and much more.
Previous
Reply
Map
View

Click here to load this message in the networking platform