Lon Posted April 5, 2005 Report Share Posted April 5, 2005 Hoping this isn’t too much to ask. I need some help with a macro to accomplish the following: I have several thousand photo files to rename to a more meaningful name. The pictures in the folder are now something like dsc05884.jpg, etc. The folder names have been renamed as desired to be more descriptive. I need to apply or copy the folder name to all of the jpg files within the folder and to append a series number to each file. I need it to continue through the current folder and stop. I would then manually move to the next folder and run the macro, etc I am a little nervous about turning something I might create, that it may not work appropriately and go beyond the current folder. I would appreciate some guidance or an example that I could work from to accomplish this. Quote Link to comment Share on other sites More sharing options...
randallc Posted April 5, 2005 Report Share Posted April 5, 2005 Hi, Lon, I have a file on the forum which sorts a directory by creation date ready to delete. List directory by date I have modified it a little, to show a text file of "how it would rename (the "rename" option is crossed out, but obviously can be edited to start working!It shows a number of options for your file name as well ; including just a number (most recent first) after directory name included, or full date and time of creation (if you wish) or..... change it to include the original file name or nmumber, or whatever; or get rid of the sort. I hope this is a start. (Attached below) Best, Randall PS check it on a small directory first; don't use "recursion" when you do activate rename! ListDirectorySorted_maybeRenamed.mxe Quote Link to comment Share on other sites More sharing options...
Lon Posted April 5, 2005 Author Report Share Posted April 5, 2005 Thanks Randall. I can at least get started with your file. If you or anyone else have any other suggestions or thoughts I would appreciate it. Quote Link to comment Share on other sites More sharing options...
randallc Posted April 6, 2005 Report Share Posted April 6, 2005 btw, Found this; Digital picture re-namer I have not tried it (found by mistake on searching forum); how relevant is it for you? Randall Quote Link to comment Share on other sites More sharing options...
Lon Posted April 6, 2005 Author Report Share Posted April 6, 2005 Randall, Thanks for the find. I played with your macro before I checked back at the forum. I certainly don't understand all of the macro writing process but was interested in your first post. I looked at the second one you found and it can work like it is. It wants to find a certain text and replace. I'll have to figure out how to capture the folder name and apply it as the file name and add the series number to the end. This is a great start and thanks for sending the info my way. Lon Quote Link to comment Share on other sites More sharing options...
randallc Posted April 7, 2005 Report Share Posted April 7, 2005 Hi Lon, I think my macro already does all that; but the part which gets the folder name is; Variable Set String %T9% "\"Variable Set String %T98% from Folder Name Variable Modify String: Copy %T98% to %T97% Repeat Until %N1% = 0 Variable Set Integer %N1% from Position of Text in Variable %T97% If Variable %N1% > 0 Variable Modify String: Delete Part of %T97% End If Repeat End Variable Set Integer %N91% from Length of Variable %T97% Variable Modify Integer: %N90% = %N91% + 15 into %T97%You could use that in the other? <TVAR2:09:01:\><TVAR2:98:10:Set folder for deletion of some files><TMVAR2:09:97:98:000:000:><REP3:08:000001:000002:0001:0:01:0><IVAR2:01:13:97:%T9%><IFVAR2:2:01:4:0><TMVAR2:11:97:00:001:N01:><ENDIF><ENDREP><IVAR2:91:12:97><NMVAR:01:90:1:0000091:2:0000015> Best, Randall 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.