pause to finish copy file

Technical support and scripting issues

Moderators: JRL, Dorian (MJT support)

Post Reply
kpassaur
Automation Wizard
Posts: 696
Joined: Wed Jul 07, 2004 1:55 pm

pause to finish copy file

Post by kpassaur » Thu Dec 15, 2005 2:39 pm

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

User avatar
Marcus Tettmar
Site Admin
Posts: 7395
Joined: Thu Sep 19, 2002 3:00 pm
Location: Dorset, UK
Contact:

Post by Marcus Tettmar » Thu Dec 15, 2005 3:08 pm

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?

kpassaur
Automation Wizard
Posts: 696
Joined: Wed Jul 07, 2004 1:55 pm

File copy pauses until done

Post by kpassaur » Thu Dec 15, 2005 4:35 pm

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.

User avatar
Marcus Tettmar
Site Admin
Posts: 7395
Joined: Thu Sep 19, 2002 3:00 pm
Location: Dorset, UK
Contact:

Post by Marcus Tettmar » Thu Dec 15, 2005 4:42 pm

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
Marcus Tettmar
http://mjtnet.com/blog/ | http://twitter.com/marcustettmar

Did you know we are now offering affordable monthly subscriptions for Macro Scheduler Standard?

Post Reply
Sign up to our newsletter for free automation tips, tricks & discounts