1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

Date and Time in names

Discussion in 'Support' started by CWBillow, Jun 17, 2009.

  1. CWBillow

    Joined:
    Jul 12, 2008
    Messages:
    194
    Likes Received:
    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
     
  2. Charles Dye

    Charles Dye Super Moderator
    Staff Member

    Joined:
    May 20, 2008
    Messages:
    3,300
    Likes Received:
    39
    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"
    
     
  3. CWBillow

    Joined:
    Jul 12, 2008
    Messages:
    194
    Likes Received:
    0
    Thanks Charles. That'll give me just what I need...and a lesson in date/time formatting, I think!

    Chuck
     
  4. CWBillow

    Joined:
    Jul 12, 2008
    Messages:
    194
    Likes Received:
    0
    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
     
  5. Steve Fabian

    Joined:
    May 20, 2008
    Messages:
    3,520
    Likes Received:
    4
    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
     
  6. CWBillow

    Joined:
    Jul 12, 2008
    Messages:
    194
    Likes Received:
    0
    Steve, and what of the "setdos/y1"? Isn't that available in v0? 'cause I get an error using it.

    Chuck
     
  7. samintz

    samintz Scott Mintz

    Joined:
    May 20, 2008
    Messages:
    1,187
    Likes Received:
    11
    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:


     
  8. Steve Fabian

    Joined:
    May 20, 2008
    Messages:
    3,520
    Likes Received:
    4
    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
     
  9. Charles Dye

    Charles Dye Super Moderator
    Staff Member

    Joined:
    May 20, 2008
    Messages:
    3,300
    Likes Received:
    39
    Thanks, Steve -- I had completely forgotten that one!
     
  10. CWBillow

    Joined:
    Jul 12, 2008
    Messages:
    194
    Likes Received:
    0
    Thanks Scott.
     
  11. Steve,

    What program do you use to extract the EXIF data?

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



     
  12. Steve Fabian

    Joined:
    May 20, 2008
    Messages:
    3,520
    Likes Received:
    4
    CSGalloway@nc.rr.com 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.


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

Share This Page