Jump to content

Recommended Posts

Posted

I just realized why a folder copy is failing somewhat. There isn't always enough time for the copy to finish. Is there a way for AI to determine when a particular dir copy has finished so that I can then continue the script after that point? The basic operation is:

$sourceFolder = @UserProfileDir & "\Start Menu"
$destinationFolder = @ScriptDir & "\BKPfldr- StartMenu"
DirCopy($sourceFolder, $destinationFolder, 8)

I'm trying to do a folder rename, which should only happen after the file contents have been copied completely. If there is any slowdown in system and sleep finishes and folder gets renamed, it cuts into the copying process so resulting folder backup is incomplete. Did a search and looked through help file, as usual, but can't find term to use.

Thx. :P

Posted

DirCopy doesn't return until completion. You need to check for @ERROR because it sounds like its failing.

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
×
×
  • Create New...