oded Posted March 2, 2009 Report Share Posted March 2, 2009 I created a very simple macro which copies a folder (including all subfolders and files) to another disk. The name of the main (new) folder is changed. First time (when the new folder is still not created) the macro runs flawlessly, creates the new main folder and copies al subfolders and files. However when I try to run the macro again it doesn't work. There are about 100 subfolders and 1500 files. I thought the Copy File or Files command overwrites existing files and folders. If I'm right - why doesn't my macro work? If I'm wrong - is there a way to do it? Thanks, Oded. Quote Link to comment Share on other sites More sharing options...
terrypin Posted March 3, 2009 Report Share Posted March 3, 2009 I created a very simple macro which copies a folder (including all subfolders and files) to another disk.The name of the main (new) folder is changed. First time (when the new folder is still not created) the macro runs flawlessly, creates the new main folder and copies al subfolders and files. However when I try to run the macro again it doesn't work. There are about 100 subfolders and 1500 files. I thought the Copy File or Files command overwrites existing files and folders. If I'm right - why doesn't my macro work? If I'm wrong - is there a way to do it? Thanks, Oded. Moving or copying an entire folder is more complicated than it should be IMO, as discussed in this thread. http://pgmacros.invisionzone.com/index.php?showtopic=3655 I've now submitted a formal feature request. Like other well-designed ME commands, I think a new Move/Copy Folder command should be added. Its dialog would simply let you browse to the Target folder and Destination folder respectively (checking for the latter's existence in standard Windows fashion and giving you the option of creating it if not), and a checkbox asking whether you want to Move or Copy. -- Terry, East Grinstead, UK Quote Link to comment Share on other sites More sharing options...
oded Posted March 3, 2009 Author Report Share Posted March 3, 2009 Moving or copying an entire folder is more complicated than it should be IMO, as discussed in this thread.http://pgmacros.invisionzone.com/index.php?showtopic=3655 I've now submitted a formal feature request. Like other well-designed ME commands, I think a new Move/Copy Folder command should be added. Its dialog would simply let you browse to the Target folder and Destination folder respectively (checking for the latter's existence in standard Windows fashion and giving you the option of creating it if not), and a checkbox asking whether you want to Move or Copy. -- Terry, East Grinstead, UK Thanks Terry However I can't understand why at first run (when the destination folder doesn't exist yet) the macro runs flawlessly, but gets stuck when destination folder already exists. Oded. Quote Link to comment Share on other sites More sharing options...
terrypin Posted March 3, 2009 Report Share Posted March 3, 2009 Thanks Terry However I can't understand why at first run (when the destination folder doesn't exist yet) the macro runs flawlessly, but gets stuck when destination folder already exists. Oded. Did you read Post #7 of that thread? I can't tell without studying your macro code, but I suspect the difference in behaviour is due to the absence or not of the trailing backslash. -- Terry, East Grinstead, UK Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.