I want to BATCH RENAME about 800 mp4 videos, placing the date taken as YYYY-DD-MM at the beginning (they all have metadata also)
This is an example a file name with a Date of Nov 22, 2022 (input)
VID_20221122_23445.mp4
This is the NEW NAME I want from the above input:
2022-11-22_23445.mp4
What do I type into these two boxes for this BATCH RENAME?
REPLACE (what do I type here?)
With (what do I type here?)
THANKS, GeneS
How do I BATCH RENAME 800 mp4 files?
Re: How do I BATCH RENAME 800 mp4 files?
If all your files match that pattern exactly, then you should be able to do this using regular expressions. You'll have to use info that's in the file name, because other than filesystem data (like creation date, modification date, etc) I don't think XnViewMP will use metadata in videos for renaming. It has support for EXIF/IPTC/XMP.
So in the Batch rename dialog, just put a checkmark on Replace, also put a checkmark on Use Regular Expressions, and fill out the replace and with fields like this:
Replace: VID_(\d\d\d\d)(\d\d)(\d\d)
With: \1-\2-\3
You don't need anything else checked or filled out in the Batch Rename dialog, just the Replace parameters.
That will produce a filename like you desire. You'll be able to see in the preview at the bottom of the dialog what it will do before you execute the rename. Google Regular Expressions to understand what this is actually doing and to learn how to use them in the future.
You can only do one replacement at a time in XnViewMP, which is just enough to do what you want here, but not for anything more complicated...
If I were trying to do this, I would use Advanced Renamer: https://www.advancedrenamer.com/
It can do almost anything with renaming, and if necessary you can program specialized functionality in javascript. It has a graphical way to build your renaming function, and shows what it's going to do before it does it. It is also capable of using regular expressions and metadata from the files.
The app's website also has a support forum if you get stuck.
When building your renaming methods, assuming all your files match that pattern exactly, you can do it a couple of ways.
1. Start with a trim of the first 4 characters, then insert a couple of - characters at specific places.
or
2. Trim the first 12 characters, then insert a date from the tags.
I'm assuming the "23445" in your example is only present in the filename, and not present in a tag. You can reference the "23445" in your example as <Word:3> in ARen if you want to move it around, since Aren understands using _ as a word separator.
Hopefully this helps... Good luck.
So in the Batch rename dialog, just put a checkmark on Replace, also put a checkmark on Use Regular Expressions, and fill out the replace and with fields like this:
Replace: VID_(\d\d\d\d)(\d\d)(\d\d)
With: \1-\2-\3
You don't need anything else checked or filled out in the Batch Rename dialog, just the Replace parameters.
That will produce a filename like you desire. You'll be able to see in the preview at the bottom of the dialog what it will do before you execute the rename. Google Regular Expressions to understand what this is actually doing and to learn how to use them in the future.
You can only do one replacement at a time in XnViewMP, which is just enough to do what you want here, but not for anything more complicated...
If I were trying to do this, I would use Advanced Renamer: https://www.advancedrenamer.com/
It can do almost anything with renaming, and if necessary you can program specialized functionality in javascript. It has a graphical way to build your renaming function, and shows what it's going to do before it does it. It is also capable of using regular expressions and metadata from the files.
The app's website also has a support forum if you get stuck.
When building your renaming methods, assuming all your files match that pattern exactly, you can do it a couple of ways.
1. Start with a trim of the first 4 characters, then insert a couple of - characters at specific places.
or
2. Trim the first 12 characters, then insert a date from the tags.
I'm assuming the "23445" in your example is only present in the filename, and not present in a tag. You can reference the "23445" in your example as <Word:3> in ARen if you want to move it around, since Aren understands using _ as a word separator.
Hopefully this helps... Good luck.
Re: How do I BATCH RENAME 800 mp4 files?
As a general principle when batch processing files, whether renaming or performing other operations, it is often best to work on a copy of the original files so as to avoid potential undesirable outcomes... 
Re: How do I BATCH RENAME 800 mp4 files?
Perhaps you can use this name template in the first field :
{Modified Date [Y-m-d_HMS]}
or
{META:ModifyDate [Y-m-d_HMS]}
but timezone can be wrong ...
Depending on the video format, these metadata may be missing
So I recommend following Cday's advice !
{Modified Date [Y-m-d_HMS]}
or
{META:ModifyDate [Y-m-d_HMS]}
but timezone can be wrong ...
Depending on the video format, these metadata may be missing
So I recommend following Cday's advice !
Catalogage avec XnviewMP :
https://orchisere.fr/logiciels/html/xnviewmpintro.htm
Tutoriel exiftool : https://orchisere.fr/logiciels/html/exiftool.htm
https://orchisere.fr/logiciels/html/xnviewmpintro.htm
Tutoriel exiftool : https://orchisere.fr/logiciels/html/exiftool.htm