Removing First 5 Characters from File Names

I need a macro that will remove the first 5 characters from the names of .jpg files in a folder. The file names always begin with four numbers, followed by a space, as in these examples:

0000 RM2280_FG_v10.jpg
0001 RM2290_FG_v10.jpg
0002 RM2300_BG_v11.jpg

I'd like the macro to rename the files to the following:

RM2280_FG_v10.jpg
RM2290_FG_v10.jpg
RM2300_BG_v11.jpg

Any suggestions would be greatly appreciated!

Thanks!

Brett

Give this a whirl. Just select as many JPEGs as you want to rename and trigger the macro. It does ask for confirmation, just to be safe, but you can turn that off, of course.

Batch Rename Deleting First Five Letters.kmmacros (6.4 KB)

Thanks so much for the quick reply! I'll test it out.

Best,

Brett

@Brettarius - Here was my effort.

Remove characters.kmmacros (2.7 KB)

1 Like

Thanks kcwhat! I'll check it out.

Best,

Brett

If your requirement is to always remove the FIRST 5 characters of the file name, this can be done completely in KM without using any scripts.

I have just posted this macro:

MACRO: Remove Leading Characters from File Names in Folder [Example]

Please let us know if it meets your needs.

@kcwhat, didn't see your post until after I made mine. Looks like we have a similar approach. :wink:

1 Like