Rename picture and video files using EXIF and <datemedia>

Please check the FAQ (https://www.xyplorer.com/faq.php) before posting a question...
Post Reply
tomuser
Posts: 135
Joined: 04 Dec 2009 18:52

Rename picture and video files using EXIF and <datemedia>

Post by tomuser »

I'm struggling to find proper command to batch rename currently selected picture and video files. So for example if picture has file name "DSC_001.JPG" and creation date from EXIF is "15.02.2023 16:34:22" then final name for file would be "15022023_163422_DSC_001.JPG"

For pictures I'd like to use either creation date or modified date from EXIF and for videos XYplorer's newest addition "<datemedia>" info for renaming them and maintaining their original name as well.

RalphM
Posts: 2042
Joined: 27 Jan 2005 23:38
Location: Cairns, Australia

Re: Rename picture and video files using EXIF and <datemedia>

Post by RalphM »

You could try a CFA as follows:

Code: Select all

|"Rename with EXIF date && filename" \;*>::rename b, '<dateexif ddmmyyyy_HHnnss>_*'
Ralph :)
(OS: W11 24H2 Home x64 - XY: Current x32 beta - Office 2024 32-bit - Display: 1920x1080 @ 125%)

tomuser
Posts: 135
Joined: 04 Dec 2009 18:52

Re: Rename picture and video files using EXIF and <datemedia>

Post by tomuser »

RalphM wrote: 15 Feb 2023 16:02 You could try a CFA as follows:

Code: Select all

|"Rename with EXIF date && filename" \;*>::rename b, '<dateexif ddmmyyyy_HHnnss>_*'
Just additional question: what do these parts do which I have marked with bold blue?

|"Rename with EXIF date && filename" \;*>::rename b, '<dateexif ddmmyyyy_HHnnss>_*'

I used only this last part as my script:

Code: Select all

rename b, '<dateexif yyyymmdd_HHnnss>_*', p
and seems to work well. I added also "p" for preview for safety.

RalphM
Posts: 2042
Joined: 27 Jan 2005 23:38
Location: Cairns, Australia

Re: Rename picture and video files using EXIF and <datemedia>

Post by RalphM »

These are part of the CFA syntax, so you should read up on CFA's in the help file
If you use just the rename command by itself in a script, it doesn't handle multi-selection whereas a CFA would.
Ralph :)
(OS: W11 24H2 Home x64 - XY: Current x32 beta - Office 2024 32-bit - Display: 1920x1080 @ 125%)

Post Reply