Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

SEEK: utility to add file date to name

1 view
Skip to first unread message

jasper

unread,
Mar 4, 2009, 7:33:39 AM3/4/09
to
I want to date stamp my image files (JPEG, GIF, etc).

Is there a free utility for WinXP which renames a file by adding
the file's Modified Date to it's file name?

---

For example, a file called "DIAGRAM.GIF" modified on 15 June
2008 gets renamed as "DIAGRAM 15-JUNE-2008.GIF"

Joe Makowiec

unread,
Mar 4, 2009, 7:50:29 AM3/4/09
to

Exiftool does this nicely:

http://www.sno.phy.queensu.ca/~phil/exiftool/

--
Joe Makowiec
http://makowiec.org/
Email: http://makowiec.org/contact/?Joe
Usenet Improvement Project: http://improve-usenet.org/

jasper

unread,
Mar 4, 2009, 8:02:19 AM3/4/09
to
On 04 Mar 2009, Joe Makowiec wrote:
> On 04 Mar 2009 in rec.photo.digital, jasper wrote:
>>
>>
>> I want to date stamp my image files (JPEG, GIF, etc).
>>
>> Is there a free utility for WinXP which renames a file by
>> adding the file's Modified Date to it's file name?
>>
>> ---
>>
>> For example, a file called "DIAGRAM.GIF" modified on 15
>> June 2008 gets renamed as "DIAGRAM 15-JUNE-2008.GIF"
>>
>
> Exiftool does this nicely:
>
> http://www.sno.phy.queensu.ca/~phil/exiftool/
>


Exiftool? My image files do not contain any data in the EXIF
fields.

I want to rename the files to make the name include the file's
Modified Date as displayed in XP's file properties.


(If it makes it clearer, you could assume these files are not
image files.)

David J Taylor

unread,
Mar 4, 2009, 8:44:53 AM3/4/09
to

Try PIE - Picture Information Extractor

http://www.picmeta.com/products/picture-information-extractor.htm

It doesn't rely on EXIF data, although it can use it if it exists.

Not free, but perhaps there's a trial period?

David

Jürgen Exner

unread,
Mar 4, 2009, 9:06:25 AM3/4/09
to
jasper <jasperdoes...@com.invalid> wrote:
>Exiftool? My image files do not contain any data in the EXIF
>fields.
>I want to rename the files to make the name include the file's
>Modified Date as displayed in XP's file properties.

Well, then I wonder, what your question has to do with photography.

>(If it makes it clearer, you could assume these files are not
>image files.)

This 4 line Perl script will do that simple job nicely:

for (@ARGV){
my ($day, $month, $year) = (localtime((stat($_))[9]))[3..5];
$year += 1900; $month += 1;
rename $_, "$year-$month-$day-$_";
}

jue

Message has been deleted

Susan Bugher

unread,
Mar 4, 2009, 10:29:16 AM3/4/09
to
jasper wrote:
>> On 04 Mar 2009 in rec.photo.digital, jasper wrote:

>>> I want to date stamp my image files (JPEG, GIF, etc).
>>>
>>> Is there a free utility for WinXP which renames a file by
>>> adding the file's Modified Date to it's file name?

>>> For example, a file called "DIAGRAM.GIF" modified on 15


>>> June 2008 gets renamed as "DIAGRAM 15-JUNE-2008.GIF"

> I want to rename the files to make the name include the file's

> Modified Date as displayed in XP's file properties.

THE Rename can do that. See the "FileDateEx" topic in the help file.

Program: THE Rename
Author: Hervé Thouzard
Windows 95; 98; ME; 2000; XP; Windows Server 2003
Ware: (Donationware) (free)
http://www.herve-thouzard.com/
http://www.herve-thouzard.com/therename.zip

Changing the subject. The Rename (primarily a file renamer) can also
change the file date. Photographers take note. . .

<Q>
Change files date and time

This option allows you to modify creation's date, last access date and
the last modification's date for a file. You can also modify the timestamp.

<snip>

The EXIF option is very usefull if you have photos you have made with
your digital camera. Recent cameras add information about date and time
(and many other things) inside the photos. You can use this date and
time (if they are available) to change the file's date and time.

</q>

Susan
--
Posted to alt.comp.freeware
Search alt.comp.freeware (or read it online):
http://www.google.com/advanced_group_search?q=+group:alt.comp.freeware
Pricelessware & ACF: http://www.pricelesswarehome.org
Pricelessware: http://www.pricelessware.org (not maintained)

Dave Cohen

unread,
Mar 4, 2009, 10:32:56 AM3/4/09
to

The freeware program renamemaster.exe will do what you want. It's a
standalone program, just save and create a shortcut to it.
Dave Cohen

Kartnin

unread,
Mar 4, 2009, 11:23:52 AM3/4/09
to

"Susan Bugher" <sebu...@yahoo.com> wrote in message
news:717l0vF...@mid.individual.net...


Looks good. It's not exactly "intuitive" is it?

Can't find how to change to another folder!


Message has been deleted

Susan Bugher

unread,
Mar 4, 2009, 11:46:10 AM3/4/09
to
Kartnin wrote:
> "Susan Bugher" <sebu...@yahoo.com> wrote in message
> news:717l0vF...@mid.individual.net...

>> Program: THE Rename


>> Author: Hervé Thouzard
>> Windows 95; 98; ME; 2000; XP; Windows Server 2003
>> Ware: (Donationware) (free)
>> http://www.herve-thouzard.com/
>> http://www.herve-thouzard.com/therename.zip

> Looks good. It's not exactly "intuitive" is it?

<grin> It is a bit daunting at first. Persevere and things will get easier.

> Can't find how to change to another folder!

Look at the tabs that are shown on top of the right pane - select
"folders" to see the folder navigation tree.

Justin C

unread,
Mar 4, 2009, 3:39:56 PM3/4/09
to

I was going to suggest Perl, but that there would a steep learning
curve... but you went one, or several better and provide a solution.
Nice.

Had to refer to docs to fully understand it though. Impenetrable, but
elegant in it's brevity.

Justin.

--
Justin C, by the sea.

Jürgen Exner

unread,
Mar 4, 2009, 5:57:03 PM3/4/09
to

Actually very simple:
- the 9th element of the result of stat() is the desired "last modified"
time in epoch seconds
- from that epoch time localtime() will compute many data items in
different formats. I need the 3rd, 4th, and 5th items from that result
for day, month and year.

Really rather simple, actually.

jue

Message has been deleted

Ofnuts

unread,
Mar 5, 2009, 5:21:10 AM3/5/09
to

There is surely a way with plain Windows shell commands (because in a
"for" loop, you can use "%~tF" to obtain the date/time string of the
file in a %F(*). However, using it to _insert_ a readable date/time in
the file name isn't going to be pretty, certainly much less readable
than its Perl equivalent. There could also be a way with \/15u4|8451(.

(*) for instance,try:
for %F in (*.*) do @echo %F is dated %~tF


--
Bertrand

J. Clarke

unread,
Mar 5, 2009, 9:56:19 AM3/5/09
to

Just a comment but Windows has more powerful tools than the command or cmd
shells available.

2K and later have Windows Scripting Host that runs vbscript and jscript code
from the command line--with older versions of windows you have to invoke it
with cscript (i.e. cscript helloworld.vbs) but in Vista you can just type
"helloworld" on the command line and if helloworld.vbs is anywhere in your
search path it will run.

If you search the Microsoft site on "Windows script" you'll find quite a lot
of information.

When Vista shipped they added another capability, the Powershell, which is
downloadable for Vista and XP--that's a full Unix-style shell with complete
scripting capability, but it is not exactly a clone of any of the Unix
shells--Microsoft as usual went off in their own direction.

For someone versed in vbscript, jscript, or Powershell scripting such an
application should be easy to toss off.

All that said, since there are decent purpose-made applications for that
particular task that can be obtained free or at nominal cost there's no real
point to writing a script, but I thought I would mention this.

Justin C

unread,
Mar 5, 2009, 5:03:43 PM3/5/09
to

Jurgen,

My Perl and your Perl are very different. You understand it, I just use
it in conjunction with the docs, and my code is, therefore, inelegant. I
see how you got where you did, but I'd have taken several steps to get
there. I'll put it down to practice and carry on asking for help in
clpm.

Message has been deleted

Floyd L. Davidson

unread,
Mar 5, 2009, 10:05:35 PM3/5/09
to
Marty Fremen <Ma...@fremen.invalid> wrote:
>m...@mine.net wrote:
>> Use the batch rename function of Irfanview.
>> http://www.irfanview.com
>
>Use this rename pattern: $N $T(%d-%m-%Y)
>$N = original name, $T = file date, followed by the desired date format.
>Pressing the help button in the batch dialog will give you fuller info with
>examples.
>
>I don't think the month can be done in words, only numbers. The above would
>give "DIAGRAM 15-06-2008.GIF"

It will sort better of that is done with the
year-month-day order instead.

--
Floyd L. Davidson <http://www.apaflo.com/floyd_davidson>
Ukpeagvik (Barrow, Alaska) fl...@apaflo.com

0 new messages