Copy link to clipboard
Copied
We purchased a large batch of design assets and began to rename them. After much thought we decided we would like to keep the original file names based on the fact that we can search the provider (shutterstock) which would make them easier to find in our DB. I need help removing the text we've added and reverting to the original file names. Examples below.
Current name:
baby_feet shutterstock_9193737.jpg
stars shutterstock_1018373.eps
we simply want to drop everything prior to the "shutterstock" and keep everything the same after. We would like the follows to look as shown below.
shutterstock_9193737.jpg
shutterstock_1018373.eps
thanks in advance for any advice on how to fix this blunder
I can't see your full file names, but I think this will do what you want:
Find: ^(\_)(\w+)(\_)
Replace: blank
Another approach: if you want to remove the same number of characters from the beginning of all the file names (in your case, 12), you could do this:
Find: ^(.{12})
Replace: blank
Copy link to clipboard
Copied
Have you looked at using Bridge's batch rename…? It now has regexp & string subbing… You also have the opportuinity to store previous name in file XMP when renaming…
Copy link to clipboard
Copied
Yes,
Familiar with it, but unfamiliar with the needed text or text string to remove the titles shown above and simply leave the last portion.
Copy link to clipboard
Copied
Well this could be done with script or the built-in Batch Rename function… Much depends on where all these files are?
This should give you what you want… ^ matches beginning of line . the dot matches any character the + makes the dot greedy then \s matches space… Replace with nothing… Hope that makes sence…?
Copy link to clipboard
Copied
Doesn't make sense at all...but it worked!
Thanks for the amazing time saver.
Copy link to clipboard
Copied
As always there is more than one way, another would be to use:-
[^shu]*
In the find field, this get everything upto shu. Leave the replace with blank.
Copy link to clipboard
Copied
I does make total sense… If you don't want to learn or have the time for script do learn reguar expressions ( GREP )… Bridge ( rename ) & InDesign ( find & replace and styles ) make use of these pattern matches… Very cool stuff… and yes Paul lots of ways to skin a cat I do like that… but it takes a little practice…
Copy link to clipboard
Copied
I could kiss you! Thank you so much!
Copy link to clipboard
Copied
I have a similar issue but I don't understand the find functions. The Photoshop export layers to files function add a load of unwanted prefix numbering to the files.
Do you know what string substitution I should need to use to remove a sequence like so:
I can remove _0000s_00 by simply adding that, but how do I do the entire sequences between the underscores in one clean sweep?
It would save me a lot of messing about.
Thanks
Will
Copy link to clipboard
Copied
I can't see your full file names, but I think this will do what you want:
Find: ^(\_)(\w+)(\_)
Replace: blank
Another approach: if you want to remove the same number of characters from the beginning of all the file names (in your case, 12), you could do this:
Find: ^(.{12})
Replace: blank
Copy link to clipboard
Copied
@Will Price - if the answer works for you please mark the reply as a correct answer, thanks.
EDIT (21/05): I did it for you.