Hello,
Is there a vb script that will copy a file, wait til it is copied, and then copy another? Or is there a way to do that with movefile or any other command? I tried using that command but the script continues before it finishes the copy. I need to move many many files, large files. So if it doesn't wait for the process to finish it will end up locking up.
Thanks for helping,
PepsiHog
Move a file
Moderators: Dorian (MJT support), JRL
Move a file
Windows 7
PepsiHog. Yep! I drink LOTS of Pepsi (still..in 2024) AND enjoy programming. (That's my little piece of heaven!)
The immensity of the scope of possibilities within Macro Scheduler pushes the user beyond just macros!
PepsiHog. Yep! I drink LOTS of Pepsi (still..in 2024) AND enjoy programming. (That's my little piece of heaven!)
The immensity of the scope of possibilities within Macro Scheduler pushes the user beyond just macros!
- Marcus Tettmar
- Site Admin
- Posts: 7395
- Joined: Thu Sep 19, 2002 3:00 pm
- Location: Dorset, UK
- Contact:
Re: Move a file
MoveFile should wait for completion before continuing. Never known it not to. So I'm not sure why you are seeing different. But if you don't want to use MoveFile you could run>cmd.exe /c move .....
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?
-
- Pro Scripter
- Posts: 60
- Joined: Tue Dec 22, 2009 9:51 am
- Location: Mannheim ( Germany )
- Contact:
Re: Move a file
Hallo , i use robocopy for the copywork ,
Let>path=C:\Windows\System32\Robocopy.exe
Let>source=c:\test
Let>target=d:\mytarget\
Let>options=/COPY:DAT /E /MT /W:2
// Robocopy Action
Let>Action=%path% %source% %target% %options%
Let>RP_WINDOWMODE=1
RunProgram>%Action%
Label>hier
WaitWindowClosed>C:\Windows\System32\Robocopy.exe
ProcessExists>Robocopy.exe,pExists
IF>pExists=True
Goto>hier
ELSE
ENDIF
exit
Let>path=C:\Windows\System32\Robocopy.exe
Let>source=c:\test
Let>target=d:\mytarget\
Let>options=/COPY:DAT /E /MT /W:2
// Robocopy Action
Let>Action=%path% %source% %target% %options%
Let>RP_WINDOWMODE=1
RunProgram>%Action%
Label>hier
WaitWindowClosed>C:\Windows\System32\Robocopy.exe
ProcessExists>Robocopy.exe,pExists
IF>pExists=True
Goto>hier
ELSE
ENDIF
exit
Oliver Hilger Mannheim
alias Olllllliii
alias Olllllliii