Re: pause until command completes before next command
- From: "Pegasus \(MVP\)" <I.can@xxxxxxxxxx>
- Date: Fri, 11 Apr 2008 22:04:15 +0200
<sheel331@xxxxxxxxx> wrote in message
news:50383f89-df4e-4532-b9e2-1004c3458ce2@xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
Hello,
In VBScript, is there a way to pause the script from executing a
command until the previous command is complete? I know in
wshshell.run, you can have the ",,true" option, but what about for
another command, specifically a copyfolder command?
I have a command the copies a folder to a backup location and then
manipulates it right afterwards. Currently, what I am doing is after
the copyfolder command is executed, I sleep for 5 seconds. Most of the
time, this works, but for some larger folders which takes longer than
5 seconds to copy, the script will error out.
Is there a way to do what I want?
Thanks in advance,
Sheel Shah
As far as I know, the method
FileSystemObject.CopyFolder "c:\mydocuments\letters\*", "c:\tempfolder\"
will complete the copy process before continuing with the next
line of code.
.
- References:
- pause until command completes before next command
- From: sheel331
- pause until command completes before next command
- Prev by Date: Hard and Soft Exit for HTA
- Next by Date: Re: Search in HTM files
- Previous by thread: pause until command completes before next command
- Next by thread: Hard and Soft Exit for HTA
- Index(es):
Relevant Pages
|