Page 1 of 1

Batch rename files to their file dates and times?

Posted: Mon Aug 06, 2007 1:30 pm
by ghost zero
Is there a way to batch rename files to their file dates and times? Such as:

"[modified date time]" = 2007/08/04 12h-38m-23s.jpg

Re: Batch rename files to their file dates and times?

Posted: Mon Aug 06, 2007 1:40 pm
by xnview
ghost zero wrote:Is there a way to batch rename files to their file dates and times? Such as:

cat.jpg > 2007/08/04 12:38.jpg
You can use something like "<Accessed Date [Y/M/d H:M]>"

Posted: Wed Aug 08, 2007 5:31 pm
by ghost zero
anyway to make it like:

2007/08/04 12h.38m.23s.jpg

i tried using a lowercase s and it turns into an 08...

Posted: Wed Aug 08, 2007 8:28 pm
by helmut
ghost zero wrote:anyway to make it like:

2007/08/04 12h.38m.23s.jpg

i tried using a lowercase s and it turns into an 08...
This filename template roughly does the job:
<Accessed Date [Y/m/d H]>h.<Accessed Date [M]>m.<Accessed Date >s

It's a bit complicated, but not too bad, I think. For some reason I don't understand (at the moment) the slashes are converted to minus chars, output is for example "2007-08-04 12h.38m.23s.jpg".

With "Replace Char" you can change the minus char to slash and get exactly what you want. But I think there should be a way in the template to get the slash... Does anyone have an explanation for the slashes?

Re: Batch rename files to their file dates and times?

Posted: Wed Aug 08, 2007 8:31 pm
by helmut
xnview wrote:You can use something like "<Accessed Date [Y/M/d H:M]>"
Supposed to be "<Accessed Date [Y/m/d H:M]>" (with lowercase "m" for month).

Posted: Wed Aug 08, 2007 8:35 pm
by ghost zero
...

Posted: Thu Aug 09, 2007 1:22 pm
by JohnFredC
For some reason I don't understand (at the moment) the slashes are converted to minus chars, output is for example "2007-08-04 12h.38m.23s.jpg"
Isn't a slash in a file name verboten in FAT32 and NTFS? My systems certainly won't accept it.

Posted: Thu Aug 09, 2007 2:49 pm
by Dreamer
Yes it is, also these \ | / < > : ? and perhaps more.

Instead…

Posted: Thu Aug 09, 2007 4:13 pm
by Clo
:) Hello !

• As a workaround, when I need a separator in a file-name I use often the character ¦ (Alt+0166) which is allowed. ;)

- Also when there is an alternative in the spelling, i.e. : “S¦he is…”, that shortens the strings.

:mrgreen: KR
Claude
Clo

Posted: Thu Aug 09, 2007 4:28 pm
by JohnFredC
I like · (alt+183) or (alt+149), though lately I have also been using periods:

For instance:

CAP·DM·V1.070809.exe

Naturally these characters don't work with all display fonts. Not an issue for me, though.

Also---

Posted: Thu Aug 09, 2007 4:44 pm
by Clo
:) I use them too, and no font problem for me as well, I have put the MS Sans Serif “in the dust bin” !

:mrgreen: KR
Claude
Clo

Posted: Thu Aug 09, 2007 5:29 pm
by helmut
JohnFredC wrote:
For some reason I don't understand (at the moment) the slashes are converted to minus chars, output is for example "2007-08-04 12h.38m.23s.jpg"
Isn't a slash in a file name verboten in FAT32 and NTFS? My systems certainly won't accept it.
Oops, correct. Filenames must not contain these characters.

Posted: Sat Aug 18, 2007 1:31 am
by ghost zero
how about adding a new code to simplify this and prevent errors? such as:

"[modified date time]" = 2007/08/04 12h-38m-23s.jpg

year, month, date, h m s ... renamed in such a way that the date/time alphabetizes correctly