droodled Posted November 29, 2009 Report Share Posted November 29, 2009 Dear All, I'm pretty new to this program. So far I've discovered it to be pretty powerfull, but to not have any logic in commands used. It's very chaotic. In spite of it, because of it's power I've started using it and think it to be worth it. I've searched the forum already, but am not able to find an answer to something which has me very much surprised. I work a lot with directories which need renaming for some or other reason. I wrote a macro for it which does work very well, BUT. -In the case of creating directories., e.g. 100, this takes less then a second using "Create Folder". -In case of renaming those same directories using "Rename Folder, This took almost a second PER folder. Could anyone shed some light on this? It has me stumped completely. Thanks for any insight to this contradiction. Best regards, Leon Quote Link to comment Share on other sites More sharing options...
rberq Posted November 29, 2009 Report Share Posted November 29, 2009 Create a .bat file to do the same renames, time it, and report back. That should tell us whether it is Macro Express that is slow to do renames, or Windows. Quote Link to comment Share on other sites More sharing options...
droodled Posted November 30, 2009 Author Report Share Posted November 30, 2009 Hello rberq, Thanks for the reply. I couldn't believe it to be windows, but to be sure I tested it. Renaming the same 100 directories using a DOS .bat file takes less then a second also. Below is the code that I use Change Directory/Folder: "C:\Program Files\Macro Express3\Macros\Test\" Option 1:ASCII File Begin Process: "SampleDirectories.txt" (Comma Delimited Text ) Option 2:Repeat with Folder Variable Set Integer %N1% to 0 Variable Set Integer %N1% from Position of Text in Variable %T1% Variable Modify Integer: Dec (%N1%) If Variable %N1% > 0 Variable Modify String: Copy Part of %T1% to %T2% Rename Folder: "%T1%" End If Option 1:ASCII File End Process Option 2:Repeat End Option 1 and 2 are the 2 setups I tried. One using repeat with folder, the other reading the directory names from a text file. Of course when 1 is used, 2 is disabled. Neither worked, meaning they both were very slow. In light of your initial question, I tried the code without the rename folder command. It then also takes less then a second. It thus looks as if the delays are caused by the rename command from ME If anybody could shed some light on this. That would be very much appreciated. Thanks, PS: I'm using w2k sp4 Quote Link to comment Share on other sites More sharing options...
rberq Posted November 30, 2009 Report Share Posted November 30, 2009 Well, it looks like you found where the slowdown occurs. I can't tell you why ME is so slow by comparison with a .bat file. If time is critical to you, you could use ME to build the .bat file, then use Launch Program to execute the .bat. That's a pragmatic solution, if not exactly an elegant one. 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.