Exit
  • Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
  • 한국 커뮤니티
1

How to remove first 5 characters in file name using batch rename

Community Beginner ,
Oct 01, 2020 Oct 01, 2020

I have a series of files that are named like: 0001 IMG_5564

I would like to remove the first 5 digits of the file name (0001 /4 numers and a space), so I am left with IMG_5564.jpg

Tried a bunch of combinations, but can't seem to make it work. Suggestions?

 

Thank you!

~ Kathleen

TOPICS
Batch , How to
8.8K
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines

correct answers 1 Correct answer

Community Beginner , Oct 01, 2020 Oct 01, 2020

I just needed to keep searching!

The answer is a string substitution of:

^.{5}

 

Translate
Community Beginner ,
Oct 01, 2020 Oct 01, 2020

I just needed to keep searching!

The answer is a string substitution of:

^.{5}

 

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Oct 01, 2020 Oct 01, 2020

Glad you worked it out!

 

There are many variations...

 

^.+\s

^\d+\s

^\d{4}\s

 

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Enthusiast ,
Jul 23, 2022 Jul 23, 2022

Yes! Make sure "regular expression" is checked

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Contributor ,
Oct 12, 2022 Oct 12, 2022

This just saved me several hours of work.  TYVM

 

I have over 3000 pictures from my holiday and the file names started with a sequence number followed by date, time, and description.  I had to insert t pictures in the low 0500s.

 

I used this to remove the sequence number.  The date and time kept them in the right order.  Then I added in the new sequence number.

 

Is there a list of other codes similar to this?  It could be handy in the future.

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Oct 12, 2022 Oct 12, 2022

@patrickh27764550 â€“ Regular Expressions (sometimes called GREP, RegEx, RegExp etc) are a whole "language", they can be generic or very much case-dependent.

 

One of many resources:

 

https://www.regular-expressions.info/

 

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Contributor ,
Oct 14, 2022 Oct 14, 2022

Awesome!!!  This might be worth studying up on.  TY

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Beginner ,
Oct 19, 2022 Oct 19, 2022
LATEST

adobe as a brief explanation on their site of regular expressions as well, linked below. i needed to remove "-proof" from about 41,000 files from a previous designer at my job to adhere to a better, more logical, naming scheme. i ended up using the simple expression " \-(proof) ". that took me about 15 minutes to figure out because I've never used regular expressions, so i hope that can help someone cut a corner.

 

https://helpx.adobe.com/coldfusion/developing-applications/the-cfml-programming-language/using-regul...

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines