Welcome!

By registering with us, you'll be able to discuss, share and private message with other members of our community.

SignUp Now!

Date and Time in names

Jul
304
0
How would I use a batch file command to rename me.txt to

"todaysdate""todaystime"me.txt (exclusive of the quotes)?

Regards,
Chuck Billow
 
How would I use a batch file command to rename me.txt to

"todaysdate""todaystime"me.txt (exclusive of the quotes)?

It would depend on your desired format for the date and time, of course. Perhaps something like this would work for you?

Code:
ren me.txt "%_isodate %@replace[:,.,%_time] me.txt"
 
It would depend on your desired format for the date and time, of course. Perhaps something like this would work for you?

Code:
ren me.txt "%_isodate %@replace[:,.,%_time] me.txt"

Thanks Charles. That'll give me just what I need...and a lesson in date/time formatting, I think!

Chuck
 
It would depend on your desired format for the date and time, of course. Perhaps something like this would work for you?

Code:
ren me.txt "%_isodate %@replace[:,.,%_time] me.txt"

Charles, I was setting up a btm file for this, and put the "setdos /y1" at the beginning -- and got an error.

Wasn't/isn't that the command to have it single-step through the batch file?

Regards,
Chuck
 
CWBillow wrote:
| ---Quote (Originally by Charles Dye)---
| It would depend on your desired format for the date and time, of
| course. Perhaps something like this would work for you?
|
|
| Code:
| ---------
| ren me.txt "%_isodate %@replace[:,.,%_time] me.txt"
| ---------
| ---End Quote---
|
| Thanks Charles. That'll give me just what I need...and a lesson in
| date/time formatting, I think!

Another alternative is %_datetime; benefit: no embedded spaces in name (but
it leaves it without punctuations).

My own scheme normally uses the file's timestamp:

ren me.txt "%@replace[-,,%@filedate[me.txt,4]]
%@replace[:.,-,%@filetime[me.txt,w,s] me.txt"

When I import photographs, I always use the file's date and time (or - when
available - the date and time the picture was taken, extracted from the EXIF
data). I do use the seconds element of time, since more than one picture can
be taken withing a minute.
--
HTH, Steve
 
CWBillow wrote:
| ---Quote (Originally by Charles Dye)---
| It would depend on your desired format for the date and time, of
| course. Perhaps something like this would work for you?
|
|
| Code:
| ---------
| ren me.txt "%_isodate %@replace[:,.,%_time] me.txt"
| ---------
| ---End Quote---
|
| Thanks Charles. That'll give me just what I need...and a lesson in
| date/time formatting, I think!

Another alternative is %_datetime; benefit: no embedded spaces in name (but
it leaves it without punctuations).

My own scheme normally uses the file's timestamp:

ren me.txt "%@replace[-,,%@filedate[me.txt,4]]
%@replace[:.,-,%@filetime[me.txt,w,s] me.txt"

When I import photographs, I always use the file's date and time (or - when
available - the date and time the picture was taken, extracted from the EXIF
data). I do use the seconds element of time, since more than one picture can
be taken withing a minute.
--
HTH, Steve

Steve, and what of the "setdos/y1"? Isn't that available in v0? 'cause I get an error using it.

Chuck
 
setdos /y1 is obsolete. You need to use the new BDEBUGGER command.

Don't embed the command within your batch script. If you desire to debug
your batch script then invoke the batch debugger with the script you wish
to debug.

E.g.

BDEBUGGER foo.btm

It is a much more powerful and robust debug environment than single
stepping.

-Scott


CWBillow <> wrote on 06/17/2009 05:12:34 PM:


>
> Steve, and what of the "setdos/y1"? Isn't that available in v0?
> 'cause I get an error using it.
>
> Chuck
>
>
>
>
 
CWBillow wrote:
|| Steve, and what of the "setdos/y1"? Isn't that available in v0?
| 'cause I get an error using it.

It was removed in V10. See the "what's new" topic.
--
Steve
 
setdos /y1 is obsolete. You need to use the new BDEBUGGER command.

Don't embed the command within your batch script. If you desire to debug
your batch script then invoke the batch debugger with the script you wish
to debug.

E.g.

BDEBUGGER foo.btm

It is a much more powerful and robust debug environment than single
stepping.

-Scott


CWBillow <> wrote on 06/17/2009 05:12:34 PM:

Thanks Scott.
 
Steve,

What program do you use to extract the EXIF data?

----- Original Message -----
From: "Steve Fábián" <>
To: <[email protected]>
Sent: Wednesday, June 17, 2009 04:45 PM
Subject: RE: [Support-t-1192] Re: Date and Time in names



> CWBillow wrote:
> | ---Quote (Originally by Charles Dye)---
> | It would depend on your desired format for the date and time, of
> | course. Perhaps something like this would work for you?
> |
> |
> | Code:
> | ---------
> | ren me.txt "%_isodate %@replace[:,.,%_time] me.txt"
> | ---------
> | ---End Quote---
> |
> | Thanks Charles. That'll give me just what I need...and a lesson in
> | date/time formatting, I think!
>
> Another alternative is %_datetime; benefit: no embedded spaces in name
> (but
> it leaves it without punctuations).
>
> My own scheme normally uses the file's timestamp:
>
> ren me.txt "%@replace[-,,%@filedate[me.txt,4]]
> %@replace[:.,-,%@filetime[me.txt,w,s] me.txt"
>
> When I import photographs, I always use the file's date and time (or -
> when
> available - the date and time the picture was taken, extracted from the
> EXIF
> data). I do use the seconds element of time, since more than one picture
> can
> be taken withing a minute.
> --
> HTH, Steve
>
>
>
>
>
 
[email protected] wrote:
| Steve,
|
| What program do you use to extract the EXIF data?

Sorry for the long delay, intent to respond fell by the wayside. I used
Google to locate some EXIF viewing, etc. software. The ones I downloaded
from forgottent URL are:

2006.03.15 00.51.41 556,899 994E9470 CommandRef.pdf
2006.06.28 23.26.38 147,456 AF9C1416 exifcopy.exe
2006.06.28 23.26.41 372,736 8B9E3153 exifdate.exe
2006.06.28 23.26.50 634,880 1C26D46A exifedit.exe
2006.06.28 23.26.59 368,640 48504E8A exiffile.exe
2006.06.28 23.27.00 126,976 FA5DDFC0 exifkey.exe
2006.06.28 23.27.02 405,504 CC236EA2 exiflist.exe
2006.03.15 00.51.41 556,899 994E9470 ExifUtils-CommandRef.pdf
2006.03.06 00.56.23 622,035 DD12B90D ExifUtils-GettingStarted.pdf
2002.05.30 22.35.06 12,895 CC27D35B EXIFutilsLicense.rtf
2006.03.06 00.56.47 297,630 2E75CB36 FieldRef.pdf
2006.03.06 00.56.23 622,035 DD12B90D GettingStarted.pdf
2002.05.30 22.35.06 12,895 CC27D35B License.rtf
2006.06.20 00.51.12 42,004 039DE241 readme-win.txt

The one which I utilize is exiflist.exe.


>From the readme-win.txt file:

EXIFutils V2.7.2 (15-June-2006)
Web: http://www.hugsan.com/EXIFutils
Email: [email protected]
Copyright (c) 2000-2006 Hugsan Pty. Ltd. All Rights Reserved.
--
Steve
 

Similar threads

Back
Top