Sign in to follow this  
Followers 0
Morel

Pause Script Until Copy Finished ?

9 posts in this topic

Hello There Is Any Way To Create a Function That Pause The Script Until The FileCopy Function Will Ended

Just Like RunWait Function That Pause The Script Until The Command is Finished ?

Thanks

Morel

Share this post


Link to post
Share on other sites



#2 ·  Posted (edited)

Before you start the copy, stick the file's size in a $var. Hang your script with a loop, checking the copied file's size inside the loop, until it is equal to the $var.

edit -

(solution 2 removed - didn't quite work)

Edited by xcal

Share this post


Link to post
Share on other sites

Thaks But u Have Try This Oprtion And The Size on a CD is not Equal to the Size on a Netwrok Drive

i need another Solotion

Morel

Share this post


Link to post
Share on other sites

It changes size after being copied?

i know that but its stil not equal size of the files cuz the the FAT on the Media and The NTFS on Network

Morel

Share this post


Link to post
Share on other sites

How about:

runwait("msiexec /qn /i C:\copy fileabc.exe h:\network share")

Share this post


Link to post
Share on other sites

Hello There Is Any Way To Create a Function That Pause The Script Until The FileCopy Function Will Ended

Just Like RunWait Function That Pause The Script Until The Command is Finished ?

Thanks

Morel

As far I know when you use FileCopy() function the script will pause until the function end.

AutoIt Scripts:NetPrinter - Network Printer UtilityRobocopyGUI - GUI interface for M$ robocopy command line

Share this post


Link to post
Share on other sites

How Can i Debug It and Know That The Script is Realy Paused

Morel

Share this post


Link to post
Share on other sites

#9 ·  Posted (edited)

i know that but its stil not equal size of the files cuz the the FAT on the Media and The NTFS on Network

Morel

Umm...the amount of space it takes on the disk may change, but the file size won't. (If Danny is right, though, it really doesn't matter. Haven't tried it, myself.)

Edited by xcal

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!


Register a new account

Sign in

Already have an account? Sign in here.


Sign In Now
Sign in to follow this  
Followers 0