Announcement

Collapse
No announcement yet.

Renaming Files With Date

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • Renaming Files With Date

    I have a lot of files in my catalogue that I need to rename. I want to use the format YYYYMMDD_[running number]_Orig.[FileExtension] where YYYY is the 4 digit year, MM is the two digit month (with a trailing 0 for month 1-9) and DD the two digit day. I can't see any such options and I couldn't find anything in the documentation, either. How can I achieve this?

  • #2
    Originally posted by mala View Post
    I have a lot of files in my catalogue that I need to rename. I want to use the format YYYYMMDD_[running number]_Orig.[FileExtension] where YYYY is the 4 digit year, MM is the two digit month (with a trailing 0 for month 1-9) and DD the two digit day. I can't see any such options and I couldn't find anything in the documentation, either. How can I achieve this?
    You haven't specified what date, so I will assume it's the EXIF:date/time Original, and you've said you want a trailing zero for the months 1 to 9, which would show them as 10,20, 30 etc which is clearly not right, so I will assume you meant a leading zero.

    So select the images
    Use Batch Rename
    Select Template (not just tick it)
    Click on Clear Template (to clear any previous template
    Click on Insert Metadata
    expand EXIF
    Expand Image
    tick Date/time Original
    Click on OK
    Move cursor to the end of <Image Date/Time Original> (make sure the <Date/Time Original is not highlighted) and type in an underscore followed by an asterisk
    So the template should now be <Image Date/Time Original>_*

    You should now have the New names show in the Preview panel as
    YYYY-MM-DD hh-mm-ss_filename.ext

    Click image for larger version  Name:	Rename (a).jpg Views:	0 Size:	121.6 KB ID:	59859

    Edit: As pointed out by Emil the date format returned does depend on the setting in Tools/Options/General/date/Time output format.
    and to get the results shown here Date should be set to yyyy/MM/dd and Time to HH:mm:ss


    To remove the "hyphen" characters, tick and select Search and Replace
    In "search for" type in a single hyphen.
    Leave Replace blank

    You should now have the new names show in the preview panel as
    YYYYMMDD hhmmss_filename.ext

    Click image for larger version  Name:	Remove hyphens.jpg Views:	0 Size:	82.3 KB ID:	59864

    To remove the time

    Select and tick Remove Text
    Start from Position 9
    Remove Count = 7

    You should now have the New names show in the Preview panel as
    YYYYMMDD_filename.ext

    Click image for larger version  Name:	Remove Time.jpg Views:	0 Size:	92.0 KB ID:	59865

    As you will probably want to use this rename format again, save it as a preset.
    Near the top of the rename dialog, to the right of the current Preset (probably showing as Default), there is a diskette icon.
    Click on that, add a preset name and click on OK to save.

    Click image for larger version  Name:	Save Preset 2.jpg Views:	0 Size:	14.0 KB ID:	59866


    Now if you are happy with the Preview shown, click on the Rename button to rename the selected files.

    NOTE: This will only work with files that have EXIF metadata, and in particular with files that specifically have EXIF Date/Time Original.
    So it won't work with most video formats, because they don't have EXIF Date/Time Original.
    You could of course choose alternate metadata date fields.
    Last edited by Greyfox; 03-10-2022, 03:27 PM.

    Comment


    • #3
      Originally posted by Greyfox View Post
      Select and tick Remove Text
      Start from Position 11
      Remove Count = 9
      Beware, the format of dates depend on settings in "Options [ALT-O] / Common". If you use a user modified format string replacements might fail. If you change the template for time to an empty string you don't need the quoted sub strings replacement.

      NOTE: This will only work with files that have EXIF metadata, and in particular with files that specifically have EXIF Date/Time Original.
      So it won't work with most video formats, because they don't have EXIF Date/Time Original.
      You could of course choose alternate metadata date fields.
      Because the batch rename in AC doesn't supply any control flow (e.g. if - then - else) I would never use it. Much better tools to do this job count in hundreds.

      Comment


      • #4
        Originally posted by Emil View Post
        Beware, the format of dates depend on settings in "Options [ALT-O] / Common".
        Correct. I have that set as

        Date: yyyy/MM/dd
        Time: HH:mm:ss

        Note that it does automatically change the "/" and the ":" to "-" because the slashes and colon chars are not valid for filenames
        Last edited by Greyfox; 03-09-2022, 11:48 PM.

        Comment

        Working...
        X