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

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

Community Beginner ,
Oct 01, 2020 Oct 01, 2020

Copy link to clipboard

Copied

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

Views

6.7K

Translate

Translate

Report

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}

 

Votes

Translate

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

Copy link to clipboard

Copied

I just needed to keep searching!

The answer is a string substitution of:

^.{5}

 

Votes

Translate

Translate

Report

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

Copy link to clipboard

Copied

Glad you worked it out!

 

There are many variations...

 

^.+\s

^\d+\s

^\d{4}\s

 

Votes

Translate

Translate

Report

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

Copy link to clipboard

Copied

Yes! Make sure "regular expression" is checked

Votes

Translate

Translate

Report

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
Participant ,
Oct 12, 2022 Oct 12, 2022

Copy link to clipboard

Copied

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.

Votes

Translate

Translate

Report

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

Copy link to clipboard

Copied

@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/

 

Votes

Translate

Translate

Report

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
Participant ,
Oct 14, 2022 Oct 14, 2022

Copy link to clipboard

Copied

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

Votes

Translate

Translate

Report

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

Copy link to clipboard

Copied

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...

Votes

Translate

Translate

Report

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