#1 2020-11-19 19:59

Antonio
Member
Registered: 2020-11-19
Posts: 3

Subtract 1 from the number at the end of filename

Hello Den4b, what about subtract 1 value to the end of the files:

IMG-20150727-WA0002.jpg
IMG-20150818-WA0000.Jpg
IMG-20150818-WA0002.jpg
IMG-20150818-WA0003.jpg
IMG-20150818-WA0004.jpg
IMG-20150818-WA0006.Jpg
IMG-20150828 WA0009.jpg
IMG-20150828 WA0011.jpg

The ones that exist like "IMG-20150818-WA0000.Jpg" they can became "IMG-20150818-WA0000-01.Jpg" With "-01" at the end.

Thanks.

PS. Nice job on ReNamer. Perhaps you should change "Pascal Script" with "Python Script".

Potentially relevant thread: How to increment number in the filename

Offline

#2 2020-11-20 00:01

den4b
Administrator
From: den4b.com
Registered: 2006-04-06
Posts: 3,367

Re: Subtract 1 from the number at the end of filename

Your statement and your example seem to contradict each other. Can you clarify if you want to append a number at the end of filenames, or you want to actually modify the existing numbers in the filename by decrementing them by 1 ?

It would also help if you provide a complete list of desired new names for your example filenames.

Offline

#3 2020-11-21 01:57

Antonio
Member
Registered: 2020-11-19
Posts: 3

Re: Subtract 1 from the number at the end of filename

Hello, I would like to decrement 1 to the end of the files before the extention.

The think is that I copy twice pictures from my smartphone from the app Whatsapp and I don't know why but the second copy increment the name of the files by one. Now I want to be sure that they are equal to be able to delete the dupes.

I see that exists files that ends in 00 that ones I want to differentiate since when I decrement one when is 01 will go to 00 and became with the same file name .

See the size of the file is right, but the name is increment by one:

BCompare-BFpgr4ow-Yl.png

Thanks.

Last edited by Antonio (2020-11-21 02:14)

Offline

#4 2020-11-24 00:10

den4b
Administrator
From: den4b.com
Registered: 2006-04-06
Posts: 3,367

Re: Subtract 1 from the number at the end of filename

It sounds like you are using a wrong tool. I would recommend using a duplicate file finder tool to eliminate your duplicate files, and then, maybe, clean up the remaining filenames if there is still a need.

A quick check for binary-duplicate files can even be performed by ReNamer by substituting the new name with an hash of the file (like MD5 or SHA1).

> Insert "C:\Temp\:Hash_SHA1:" replacing current name

After adding this rule you will get warnings about binary-duplicate files, due to identical hashes, if there are any. You could then chose to delete or move the duplicate files.

Offline

#5 2020-11-24 18:01

Antonio
Member
Registered: 2020-11-19
Posts: 3

Re: Subtract 1 from the number at the end of filename

den4b, thank you for the help.

I search for SHP1 using this tool and then renaming some files with your tool.

Thanks.

Offline

Board footer

Powered by FluxBB