Langusmon Posted July 20, 2010 Report Share Posted July 20, 2010 Hello, I am trying to take a folder that has say, 10,000 files in it, and add a .txt extenstion to the end of each either through the means of converting each file or renaming each file to put .txt on the end of the filename. The latter option I was thinking would be the easiest. Im trying to use the the Repeat with Folder option, but am unable to figure out how to go through each file in the folder to do this. Any help would be much appreciated! Quote Link to comment Share on other sites More sharing options...
mipoleon Posted July 29, 2010 Report Share Posted July 29, 2010 Hello, I am trying to take a folder that has say, 10,000 files in it, and add a .txt extension to the end of each either through the means of converting each file or renaming each file to put .txt on the end of the file name. The latter option I was thinking would be the easiest. I'm trying to use the the Repeat with Folder option, but am unable to figure out how to go through each file in the folder to do this. Any help would be much appreciated! I did something similar with a macro I wrote awhile back. What I ended up doing was writing a batch script that would navigate to the folder and make a file list. And then execute the batch scrip from with the Activate/Launch function in Macro Express. Here is some example batch script: c: cd "C:\Desired Folder Location" dir /b /od > "Text File Name.TXT" You will want to put that in a test file with a .BAT extension on it. That will then navigate to your folder and dump all the file names into the "Text File Name.TXT" file in the order they were created or modified. You can then use the Process Text File function in Macro Express to load the file names line by line then use the Rename function to make any changes that you need. PS you can pass variables to batch scripts as well if you add command line paramaters. Variable in batch scripts start with %1 and ascend %2 %3 ect. Quote Link to comment Share on other sites More sharing options...
ronald23 Posted April 20, 2017 Report Share Posted April 20, 2017 Are you looking how to batch rename files easily. Try "KrojamSoft BatchRename program"..It is a great tool. Quote Link to comment Share on other sites More sharing options...
acantor Posted April 21, 2017 Report Share Posted April 21, 2017 You do not need a macro to do this. Old-style DOS commands make short work of the job of renaming files en masse. 1. In the "Run" dialog type "cmd" and press Enter. 2. You should now be at a DOS prompt. 3. Navigate to the folder you want to act on using "cd" (change directory) commands, e.g., cd c:\Users\SSmith\Links 4. To rename every file in the folder, type this at the prompt: ren *.* *.*.txt and then press Enter. Translation: rename (ren) every file in this format: name.extension to this: name.extension.txt The "ren" command will rename the files in a blink of an eye. Quote Link to comment Share on other sites More sharing options...
Ryan Posted August 7, 2017 Report Share Posted August 7, 2017 I've done a lot of really cool file renaming projects with FileRenamer. Works a lot like the old Tag&Rename. 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.