Renaming files prefixed with 125- to 6XX0

I downloaded 400+ missing images from Adobe cloud. The good missing images were found. The strange Adobe decided each needed a prefix of 125- → 680-. This feels like a regex + find problem but my regex skills haven’t been used in a serious way for 25yrs.

Any clever tricks? (Yes I could do I manually but this is MPU)

brew install rename (easier to work with than bash/python/sed)

rename -n 's/^\d*-//' * to dry run and see what will change. Run this in the folder of images.

rename 's/^\d*-//' * to run it for real.

This will remove numbers and a dash from the start of any file name in the folder. You can make it more specific by changing the asterisk at the end, e.g., *.jpg

2 Likes

There are apps for this that are easier to use than regular expressions. Adobe Bridge can rename files. So can ForkLift and and A Better File Rename apps. Other apps whose names I have forgotten.

Can you give an example of at least three of the incorrect filenames and their desired names after being correctly renamed? We need to see a pattern.

2 Likes

Assuming the text in question only appears where you want to address it (i.e. none of the files have 125- in the middle of the name) you can do this right in Finder.

Select all of the files, right click, Rename…, then select Replace text.

3 Likes

Namemangler renaming app is on sale for $9.50 USD. I bought it along with Better Zip 5 (and if you don’t have Default Folder X, it’s amazingly useful and is also on sale on that page). You could check it out to see if will do what you want:

2 Likes

Trying to mention everyone - I might have a failure bow to do in a minute.

@cornchip - thanks the regex is dead clever

@karlnyhus it was the 125- → 6XX- prefixes I was trying to remove Adobe cloud added them on download for no reason that I could see,

@zkarj I didn’t know I could do that with finder

@jr5 I have soft spot for Many Tricks and so bought NameWrangler - $C13 is a fair price and I have a couple of other fun renames ahead.

Thanks to all.

3 Likes