OT: Need program that can change time/date in batch...

Discuss and announce Total Commander plugins, addons and other useful tools here, both their usage and their development.

Moderators: Hacker, petermad, Stefan2, white

Post Reply
Leo
Junior Member
Junior Member
Posts: 12
Joined: 2003-02-14, 07:46 UTC

OT: Need program that can change time/date in batch...

Post by *Leo »

Hi all,

OT: Need program that can change time/date in batch...


Here is the situation:

#1
I have a big list of files in WinXP (and they are all with long filenames - i.e. they are longer than 8.3).

For example:

10/18/2004 03:35 AM 111,933,222 Filename 01.dat
10/18/2004 04:36 AM 107,643,384 Filename 02.dat
10/18/2004 05:37 AM 91,124,158 Filename 03.dat
10/18/2004 06:38 AM 133,263,472 Filename 04.dat
10/18/2004 07:39 AM 91,654,706 Filename 05.dat

#2
Using old data for date/time in list above I would now like to change the time and date of current files (i.e. I would like to have old date/time data back):

Filename 01.dat
Filename 02.dat
Filename 03.dat
Filename 04.dat
Filename 05.dat


Does anyone know of any freeware and/or shareware utility that can do this?

Thanks in advance!


Leo
User avatar
van Dusen
Power Member
Power Member
Posts: 684
Joined: 2004-09-16, 19:30 UTC
Location: Sinzig (Rhein), Germany

TimeCopy.exe by Hacker

Post by *van Dusen »

If the old=source files with the dates and times, which you like to apply to the new=target files are available (as files, not only as a list of files), you could try Hacker's TimeCopy.exe. It copies the date/time from a source file (parameter 1) to a target file (parameter 2).

You can get TimeCopy.exe here:
http://thehacker.host.sk/myfiles/

And this is the appropriate thread:
http://www.ghisler.ch/board/viewtopic.php?t=5036

But if you only have a filelist (I think so), I would have no clue... sorry :(

Regards, van Dusen
Leo
Junior Member
Junior Member
Posts: 12
Joined: 2003-02-14, 07:46 UTC

Re: TimeCopy.exe by Hacker

Post by *Leo »

Hi all,
van Dusen wrote:If the old=source files with the dates and times, which you like to apply to the new=target files are available (as files, not only as a list of files), you could try Hacker's TimeCopy.exe. It copies the date/time from a source file (parameter 1) to a target file (parameter 2).

You can get TimeCopy.exe here:
http://thehacker.host.sk/myfiles/

And this is the appropriate thread:
http://www.ghisler.ch/board/viewtopic.php?t=5036

But if you only have a filelist (I think so), I would have no clue... sorry :(

Regards, van Dusen
Thanks for info (although, unfortunately, I only have a filelist)...


Leo
icfu
Power Member
Power Member
Posts: 6052
Joined: 2003-09-10, 18:33 UTC

Post by *icfu »

http://www.12ghosts.com/ghosts/filedate.htm

You can save and reload timestamps with that, so this is a possibility if you want to export/import. Unfortunately the 12Ghosts Utils are very expensive, especially when buying them standalone. If that's not a problem, try it out.

Otherwise you can write a batch which analyzes your file list using FOR and updates the timestamps using TOUCH from the GNU Coreutils:
http://gnuwin32.sourceforge.net/packages/coreutils.htm

I could do that but have no time and desires for that right now, sorry.

Icfu
This account is for sale
Leo
Junior Member
Junior Member
Posts: 12
Joined: 2003-02-14, 07:46 UTC

Post by *Leo »

Hi all,
icfu wrote:http://www.12ghosts.com/ghosts/filedate.htm

You can save and reload timestamps with that, so this is a possibility if you want to export/import. Unfortunately the 12Ghosts Utils are very expensive, especially when buying them standalone. If that's not a problem, try it out.

Otherwise you can write a batch which analyzes your file list using FOR and updates the timestamps using TOUCH from the GNU Coreutils:
http://gnuwin32.sourceforge.net/packages/coreutils.htm

I could do that but have no time and desires for that right now, sorry.

Icfu
THANK YOU IMMENSLY!!!

The "Touch" solved my problem and I can build my own simple batch file using my existing filelist (with names and dates and times)!


Leo
User avatar
Peter
Power Member
Power Member
Posts: 2068
Joined: 2003-11-13, 13:40 UTC
Location: Schweiz

Post by *Peter »

Maybe the freeware "NirCmd v1.80 - Freeware command-line tool for Windows" from http://nirsoft.net/utils/nircmd.html is a solution too..

There are many, many functions, i.e.
Change the date/time of the specified filename (creation time and modified time) nircmd.exe setfiletime "c:\temp\myfile.txt" "24-06-2003 17:57:11" "22-11-2005 10:21:56"
And this command can be handled with filelists and batch mode too, but I didn't test it yet.

Peter
TC 10.xx / #266191
Win 10 x64
Post Reply