Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

copyfile question

Status
Not open for further replies.

bn2hunt

MIS
May 15, 2003
203
US
when copying large files or large number of files using the copyfile or copyfolder command is there a way to halt the script until the copy command is completed? I need to write a script that will stop 2 processes copy around 50,000 files to a different location and then restart the script. Currently I am using a wscript.sleep loop and pausing he script for 5 hours and then restarting the proceses but I was looking for a better way to perform this function.

Thanks

Dan



 
What 'copy code' are you using and where is it copying to? Can we rely on a file count?

I'm sure we can figure out how many files are to be copied, but are there overwrites involved? That'd make it tougher.

Brian

 
I am using the file system object copyfolder method and it started working the way I thought it should and waiting until all files are copied before going to the next line of code. What I don't know is if it waits until it starts to copy the last file before going to the next line as the files are small, less than 300k each. So it could continue on as soon as it starts to copy the last file. There aren't any overwrites involved.

Dan
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top