Does anyone know of a way to pause a script until a series of files have been copied. I don't want to use wait as the time could vary because of file size and network traffic. I don't think the dos copy command will work as although I could pause the script until it is finished I will have long file names.
Any ideas would be appreicated.
Thanks
pause to finish copy file
Moderators: JRL, Dorian (MJT support)
- Marcus Tettmar
- Site Admin
- Posts: 7395
- Joined: Thu Sep 19, 2002 3:00 pm
- Location: Dorset, UK
- Contact:
What is doing the file copy - the script or something else? If the script then just use FileCopy and the script will not proceed until the copy is complete. Or are you saying you need to wait for some other process to finish copying files ...?
Marcus Tettmar
http://mjtnet.com/blog/ | http://twitter.com/marcustettmar
Did you know we are now offering affordable monthly subscriptions for Macro Scheduler Standard?
http://mjtnet.com/blog/ | http://twitter.com/marcustettmar
Did you know we are now offering affordable monthly subscriptions for Macro Scheduler Standard?
File copy pauses until done
Thank you, my real question was how to pause the script until the files were copied. The issuse I am having is not finding files on the server when I execute them with Execute File. So, I plan on copying them to the local PC first, but I cannot execute them until they are finished coping.
- Marcus Tettmar
- Site Admin
- Posts: 7395
- Joined: Thu Sep 19, 2002 3:00 pm
- Location: Dorset, UK
- Contact:
Well you just need to do something like:
CopyFile>source,dest
ExecuteFile>dest
ExecuteFile won't trigger until CopyFile has completed.
If you prefer to use DOS do:
Let>RP_WAIT=1
Run>cmd.exe /c copy %source% %dest%
ExecuteFile>dest
Let>RP_WAIT=1 will ensure the script doesn't complete until the copy command has completed.
Both methods should work fine. If you're using Win95/98/Me replace cmd.exe with command.com
CopyFile>source,dest
ExecuteFile>dest
ExecuteFile won't trigger until CopyFile has completed.
If you prefer to use DOS do:
Let>RP_WAIT=1
Run>cmd.exe /c copy %source% %dest%
ExecuteFile>dest
Let>RP_WAIT=1 will ensure the script doesn't complete until the copy command has completed.
Both methods should work fine. If you're using Win95/98/Me replace cmd.exe with command.com
Marcus Tettmar
http://mjtnet.com/blog/ | http://twitter.com/marcustettmar
Did you know we are now offering affordable monthly subscriptions for Macro Scheduler Standard?
http://mjtnet.com/blog/ | http://twitter.com/marcustettmar
Did you know we are now offering affordable monthly subscriptions for Macro Scheduler Standard?