Diana (Cda) Posted August 4, 2008 Share Posted August 4, 2008 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. Link to comment Share on other sites More sharing options...
youknowwho4eva Posted August 4, 2008 Share Posted August 4, 2008 I'm not certain, but the copy should exist as a process, would a processexist wait work? Giggity Link to comment Share on other sites More sharing options...
weaponx Posted August 4, 2008 Share Posted August 4, 2008 DirCopy doesn't return until completion. You need to check for @ERROR because it sounds like its failing. Link to comment Share on other sites More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now