topbanner_forum
  *

avatar image

Welcome, Guest. Please login or register.
Did you miss your activation email?

Login with username, password and session length
  • Sunday December 15, 2024, 6:51 am
  • Proudly celebrating 15+ years online.
  • Donate now to become a lifetime supporting member of the site and get a non-expiring license key for all of our programs.
  • donate

Author Topic: IDEA: Rename files with incremental timestamp  (Read 11353 times)

IconBoy

  • Charter Member
  • Joined in 2006
  • ***
  • default avatar
  • Posts: 35
    • View Profile
    • Donate to Member
IDEA: Rename files with incremental timestamp
« on: October 23, 2006, 08:21 PM »
I have files in a folder with different names sorted (alphabetically).
I would like the file names' time and date stamps to be re-written so
that each are 1 minute older than the previous alphabetically named one
e.g.
alan.jpg - 18:24am 25/12/2003
bob.jpg - 9:03am 01/04/2001
craig.jpg - 13:54am 12/12/2006

would become

alan.jpg - 10:12am 23/10/2006
bob.jpg - 10:13am 23/10/2006
craig.jpg - 10:14am 23/10/2006

Is there an utility that can accomplish this? I want the time/date stamp
to apply to the created | modified | accessed of the file.
Thanks very much.
« Last Edit: October 24, 2006, 05:53 AM by brotherS »

kimmchii

  • Honorary Member
  • Joined in 2005
  • **
  • Posts: 360
    • View Profile
    • Donate to Member
Re: Rename files with incremental timestamp
« Reply #1 on: October 23, 2006, 08:28 PM »
If you find a good solution and become attached to it, the solution may become your next problem.
~Robert Anthony

IconBoy

  • Charter Member
  • Joined in 2006
  • ***
  • default avatar
  • Posts: 35
    • View Profile
    • Donate to Member
Re: Rename files with incremental timestamp
« Reply #2 on: October 24, 2006, 05:03 AM »
Thanks very much for the link. I had a look at BR but do not see how I can increment time values on the filename extension.
Anyone able to help me solve this please as I am stuck.

brotherS

  • Master of Good Ideas
  • Honorary Member
  • Joined in 2005
  • **
  • Posts: 2,261
    • View Profile
    • Donate to Member
Re: IDEA: Rename files with incremental timestamp
« Reply #3 on: October 24, 2006, 05:54 AM »
I would like the file names' time and date stamps to be re-written so
that each are 1 minute older than the previous alphabetically named one
Wow... I never saw a program that can do it, but I really wonder why you want to do this!

Please enlighten me :)

IconBoy

  • Charter Member
  • Joined in 2006
  • ***
  • default avatar
  • Posts: 35
    • View Profile
    • Donate to Member
Re: IDEA: Rename files with incremental timestamp
« Reply #4 on: October 24, 2006, 06:28 AM »
Reason for needing this is because many times I need to sort photos on a SD card for a PDA and the PDA does not always sort alphabetically. If it does (and then I add a new pic to the card), the new pic is at the bottom of the card list instead of where it should be alphabetically.

JoTo

  • Super Honorary
  • Charter Member
  • Joined in 2005
  • ***
  • Posts: 236
    • View Profile
    • Donate to Member
Re: IDEA: Rename files with incremental timestamp
« Reply #5 on: October 24, 2006, 09:41 AM »
Hi IconBoy,

i have made a quick and dirty script for you in PHP, and compiled it also to a standalone windows executable, so you can use it normally and without the need to have PHP installed on your PC.

It does what you requested (as far as i tested it :-)) ). But dont expect too much. Its only a quick and dirty 20 min. hack and not a fully bloated application.

So you have to use the console window and enter the following commandline

        touchfiles <SourceDir> <StartDate> <StartTime>

e.g.   touchfiles c:\mypics\vacation 2006/08/25 11:20:13

to start setting the files in c:\mypics\vacation to date 25th August 2006 beginning at 11:20:13 am...11:21:13am...11:22.13am... and so on.

It then does basic input checking, gets and sorts all files in SourceDir alphabetically in natural order and sets their datestamps to StartDate and the Timestamps to StartTime. For every next file StartTime is incremented by 1 minute (as you wished). If StartTime reaches 23:59:59->00:00:00 StartDate is incremented by 1 day.

If you start the program with no parameters or wrong or invalid ones, a detailed usage message is printed in the console window.

Both, the last accessed and last modification date/timestamp is set. Cannot help for creation date/timestamps. Havent found a function that will do this in PHP. But in Explorer the files are shown with the correct timestamps as set by TouchFiles.

I include the SourceCode of the Script also in the ZIPFile, in fact you are a PHP-Programmer and want to modify sth. Feel free to do that.

Hope it will help you in your task. Have fun!

CU
JoTo

allen

  • Charter Member
  • Joined in 2006
  • ***
  • Posts: 1,206
    • View Profile
    • Donate to Member
Re: IDEA: Rename files with incremental timestamp
« Reply #6 on: October 24, 2006, 10:15 AM »
XYPlorer can do this too.

IconBoy

  • Charter Member
  • Joined in 2006
  • ***
  • default avatar
  • Posts: 35
    • View Profile
    • Donate to Member
Re: IDEA: Rename files with incremental timestamp
« Reply #7 on: October 24, 2006, 06:19 PM »
The little .exe helps a lot! :D
Thanks very much!!!

kimmchii

  • Honorary Member
  • Joined in 2005
  • **
  • Posts: 360
    • View Profile
    • Donate to Member
Re: IDEA: Rename files with incremental timestamp
« Reply #8 on: October 24, 2006, 07:46 PM »

alan.jpg - 18:24am 25/12/2003
bob.jpg - 9:03am 01/04/2001
craig.jpg - 13:54am 12/12/2006

would become

alan.jpg - 10:12am 23/10/2006
bob.jpg - 10:13am 23/10/2006
craig.jpg - 10:14am 23/10/2006

BR can rename them to

alan.jpg - 001-10:12am 23/10/2006
bob.jpg - 002-10:12am 23/10/2006
craig.jpg - 003-10:12am 23/10/2006

this will have the same result as incremental minutes.
If you find a good solution and become attached to it, the solution may become your next problem.
~Robert Anthony

dcwul62

  • Supporting Member
  • Joined in 2013
  • **
  • default avatar
  • Posts: 336
    • View Profile
    • Donate to Member
Re: IDEA: Rename files with incremental timestamp
« Reply #9 on: October 14, 2015, 01:08 AM »
I know this is an old thread. I was facing the same problems quite often.

There are hardly any tools that can do this.
It may be handy to update date/time incrementally, or at least the time.
For instance if you wish to combine selected screenshots having mixed date time stamp and change the date/time stamp
so the get a sequence date time stamp and can be sorted properly (e.g. screenshots of installing a program).

You may wish to check out Nirsoft bulkfilechanger, select the files, add them to BulkFIleChanger, then hit F6 tag, then tag date/time sequence mode.
=

http://imageshack.com/a/img631/8051/85Ki44.png
=

MilesAhead

  • Supporting Member
  • Joined in 2009
  • **
  • Posts: 7,736
    • View Profile
    • Donate to Member
Re: IDEA: Rename files with incremental timestamp
« Reply #10 on: October 14, 2015, 08:07 AM »
@dcwul62  It figures an unusual utility like that would be written by NirSoft.  Lots of stuff you can't find anywhere else.  :)

To the original problem of forcing FAT32 media such as USB sticks to sort alphabetically, I use FAT Sorter on my mp3 player.  It sorts a full 4GB mp3 player in a few seconds with one click.  Plus it is free.


ConstanceJill

  • Supporting Member
  • Joined in 2012
  • **
  • Posts: 243
    • View Profile
    • Donate to Member
Re: IDEA: Rename files with incremental timestamp
« Reply #11 on: October 14, 2015, 09:35 AM »
Interesting, didn't know of this utility. Back when I had an mp3 player, I used DriveSort. (Now my "mp3 player" is actually a netbook running Windows XP :p)