

These have to be correct in order for the script to work. Note the use of both "forward" and "reverse" apostrophes on the "set newline = " line. I recommend running it in test mode first.

If set to "yes" it will rename the files. If set to "no" (as it is shown here) the script will just step through the files and list the changes it would make if run in non-test mode (no filenames are changed). The do_it variable controls running the script in a test mode. This script will only handle files with names that follow the pattern of four digits with the extension ".txt" and will stop with a complaint if there are more than 500 files to rename. # This line will generate the new filename. txt from the end then convert from a string to a number. # This will loop over all the filenames in the current directory: My apologies if I missed something or otherwise did something wrong. But I have zero experience running scripts, etc., so if it involves any of that, I might need basic help learning how to run them. If anyone has an easy solution that does not use Automator, that's fine too. I've literally changed hundreds of thousands (probably millions by now) of filenames manually and could use a break. Right now, I don't think Automator can do this, but if it can, I'd love to learn how. I would like the renaming to initiate with 000-001, going up until it runs out of files. As part of my job, I need to take a bunch of files that are sequentially numbered (ex: 0000.txt, 0001.txt, 0002.txt, 0003.txt, etc.) and need to rename them with a very different sequence. I've never used Automator before, but someone directed me towards it.
