How to change the name of all Jpegs?

A swapping-ground for Regular Expression syntax

How to change the name of all Jpegs?

Postby caned_monkey » Sun May 07, 2017 4:18 pm

Hello,

Sorry for the simple question but I'm totally clueless about this.

I need to change all jpegs regardless of existing name to thumb.jpg so I'm trying to do a Match of *.jpg and replace with thumb.jpg but I'm not getting anywhere and I suspect I'm not using the wildcard correctly.

Existing file names are all the same lenght but are unique.

Can anyone let me know what I need to do please?
caned_monkey
 
Posts: 3
Joined: Sun May 07, 2017 4:10 pm

Re: How to change the name of all Jpegs?

Postby KenP » Sun May 07, 2017 4:26 pm

RegEx (1)
Match: .*
Replace: thumb
KenP
 
Posts: 198
Joined: Sat Jul 30, 2016 11:25 am

Re: How to change the name of all Jpegs?

Postby caned_monkey » Sun May 07, 2017 5:14 pm

Will that only change the name of Jpgs? I dont want it to affect any other files that are in these directories.
caned_monkey
 
Posts: 3
Joined: Sun May 07, 2017 4:10 pm

Re: How to change the name of all Jpegs?

Postby KenP » Sun May 07, 2017 5:28 pm

If there are other files in the directories try this.

Match: .*\.jpg
Replace: thumb
Include Ext.: selected

Alternatively you could filter the files so that only the .jpg files show.

Filters (12)
Mask: .*\.jpg
RegEx: Selected
KenP
 
Posts: 198
Joined: Sat Jul 30, 2016 11:25 am

Re: How to change the name of all Jpegs?

Postby caned_monkey » Sun May 07, 2017 5:48 pm

That works perfect, thanks
caned_monkey
 
Posts: 3
Joined: Sun May 07, 2017 4:10 pm


Return to Regular Expressions


cron