Copy a large file using FileSystem.CopyFile in VBscript

0

I use FileSystem.CopyFile to copy a 1GB file to another directory.

Meanwhile, another program needs to determine that the file has already been completely copied to carry out its work.

How can I determine that the file has already been copied? That is, how to know that the copy has been made completely.

Could it be using the Size attribute of the file?

    
asked by Jorge Cabrera 04.07.2017 в 18:39
source

1 answer

0

Welcome Stackoverflow Jorge.

There is no native way to do it but if there are tricks that could help us.

An example would be making the program that waits for the file to end up by always asking if there is a file called copy.done every 3 seconds in the path where the 1GB file is being copied. If the file exists then it is because it is finished copying and then proceed to delete the file copy.done . Of course, that means that the software you are copying creates the file in the destination directory after the copy process is finished.

    
answered by 04.07.2017 в 19:05