What's new

How to renumber filenames?

Status
Not open for further replies.

maki

Member
Joined
Jul 5, 2015
Messages
225
How do renumber the file names?


1#filename.jpg
2#filename.jpg
3#filename.jpg
...
10000#filename.jpg

If the order of the numbers is different, set the correct numbering.


1#z98709_9-.jpg
7#lkjn98JJJ.jpg
7710#l87658JyJ.jpg


Replace with:
1#z98709_9-.jpg
2#lkjn98JJJ.jpg
3#l87658JyJ.jpg

Note: # -> Separator


Tool ADVANCED RENAMER 3.80

 

AceInfinity

Moderator, Programming, Contributor
Joined
Feb 21, 2012
Messages
1,729
Location
Canada
You can do this with a batch script and the dir command if you sort the files and rename each with an incremented variable.
 

maki

Member
Joined
Jul 5, 2015
Messages
225
I want to keep all the original file names (unique file names - very important!).
I want to add a counter to the separator [0-9]#uniquefilename.jpg
[0-9] counter
# separator

Of course, the order of the "Date of Last Access or Modification" must be kept in the case where I do not want a mixed up order of a series of photos.
 

AceInfinity

Moderator, Programming, Contributor
Joined
Feb 21, 2012
Messages
1,729
Location
Canada
I want to keep all the original file names (unique file names - very important!).
I want to add a counter to the separator [0-9]#uniquefilename.jpg
[0-9] counter
# separator

Of course, the order of the "Date of Last Access or Modification" must be kept in the case where I do not want a mixed up order of a series of photos.
Yes - I understand. It is still possible with batch scripting though.

You can do substrings in batch, compare against digits, find the separator, and rename with the incremented number and the original filename + extension. Renaming a file doesn't change the last modified date.
 

maki

Member
Joined
Jul 5, 2015
Messages
225
I have no knowledge about scripts. Is not it better to do it in a program that has all the options to change the file numbering?

You can continue to suggest your ideas, but unless you provide a ready script or other simpler solutions.
 

Will Watts

Senior Administrator, Security Analyst
Staff member
Joined
Mar 4, 2012
Messages
5,795
Location
%tmp%
Hi maki,

We're not here to babysit you - it's unlikely anyone here will be willing to write a batch script for you.

The program you posted in your first post has batch scripting functionality. A quick Google should give you some ideas on how to do this:
Increment file name in batch script - Google Search
 

maki

Member
Joined
Jul 5, 2015
Messages
225
No need a complicated script since everything can be done in that program.
Say you do not want to help me set options in the program, or you have no idea how to use it. Topic ended. :lolg:
 

Jared

Moderator
Staff member
Joined
Feb 3, 2014
Messages
1,590
We know it isn't complicated, you've been told what you need.
There's a difference between helping you, and doing it for you.
 

Will Watts

Senior Administrator, Security Analyst
Staff member
Joined
Mar 4, 2012
Messages
5,795
Location
%tmp%
Hi maki,

I would like to remind you again that we're a free support forum, run by volunteer staff to help with genuine issues.

We're not here to argue with you - if you don't want our advice then you're welcome to post on a different forum.

On user request, this topic is closed.
 
Status
Not open for further replies.
Top