Jump to content
Macro Express Forums

Why is renaming folders so very slow


droodled

Recommended Posts

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

Link to comment
Share on other sites

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

Link to comment
Share on other sites

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.

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
×
×
  • Create New...