Desperately need Batch File Media Renaming Solutions using EXIF sidecar files

Started by RokkoRokko2019, December 19, 2019, 07:08:21 AM

Previous topic - Next topic

RokkoRokko2019

Hi Phil

This is all new to me & confusing

Can you give me a step by step process to follow with the exact line of code to paste  without me having to change anything

ie

01 - Hit return
02 - etc....

I'm just not familiar with command line use



It might be easier for me to have an exact line of code to paste in that includes both the path to the exif exe and the code to process the file

so all I would have to do is...

01 - paste in the code at the command prompt
02 - then drop in the file or folder of files
03 - and then hit enter [or whatever to launch the process]

That would mean all I have to do is pate the code and drop the file / folder to do this.


The path to the exif app is....

K:\300 - Applications Avatar\000 - Core 2 - Basic Utilities\UTIL - RENAME - EXIF - Exiftool\exiftool-11.80\exiftool(-k).exe   











Phil Harvey

OK.  Paste this:

"K:\300 - Applications Avatar\000 - Core 2 - Basic Utilities\UTIL - RENAME - EXIF - Exiftool\exiftool-11.80\exiftool(-k).exe" -tagsfromfile %d%f.xmp "-testname<$ShotDate - %f.%e" -d "%Y-%m-%d  %H-%M %S" -ext mpeg -ext xmp

Then press SPACE then drag and drop the folder, then press RETURN.

- Phil
...where DIR is the name of a directory/folder containing the images.  On Mac/Linux/PowerShell, use single quotes (') instead of double quotes (") around arguments containing a dollar sign ($).

Phil Harvey

Even easier:  Download the attached .bat file and drop the folder onto the rokko.bat file icon (no command window needed).

- Phil
...where DIR is the name of a directory/folder containing the images.  On Mac/Linux/PowerShell, use single quotes (') instead of double quotes (") around arguments containing a dollar sign ($).

RokkoRokko2019

might be getting closer, love the Bat idea

however something still not right

dropped the file on the Bat & got this

K:\300 - Applications Avatar\000 - Core 2 - Basic Utilities\UTIL - RENAME - EXIF - Exiftool\exiftool-11.80>"K:\300 - Applications Avatar\000 - Core 2 - Basic Utilities\UTIL - RENAME - EXIF - Exiftool\exiftool-11.80\exiftool(-k).exe" -tagsfromfile %d%f.xmp "-testname<$ShotDate - %f.%e" -d "%Y-%m-%d  %H-%M %S" -ext mpeg -ext xmp "K:\300 - Applications Avatar\000 - Core 2 - Basic Utilities\UTIL - RENAME - EXIF - Exiftool\exiftool-11.80\HD 151 - 99.mpeg"
'K:/300 - Applications Avatar/000 - Core 2 - Basic Utilities/UTIL - RENAME - EXIF - Exiftool/exiftool-11.80/HD 151 - 99.mpeg' --> 'K:/300 - Applications Avatar/000 - Core 2 - Basic Utilities/UTIL - RENAME - EXIF - Exiftool/exiftool-11.80/2008-10-25-ß 01-55 45 - HD 151 - 99.mpeg'
Warning: FileName encoding not specified - K:/300 - Applications Avatar/000 - Core 2 - Basic Utilities/UTIL - RENAME - EXIF - Exiftool/exiftool-11.80/HD 151 - 99.mpeg
    0 image files updated
    1 image files unchanged
-- press RETURN --


Phil Harvey

The only problem is that one of the spaces in my .bat file was a non-breaking space instead of an ASCII space, which is why you got the warning and the funny character in the file name.  I have fixed the attached file in my previous post.  Re-download the new version.

But other than that, it worked perfectly.  Nothing was changed because the .bat file is writing the "testname" tag instead of "filename".  Change this in the .bat file to actually rename the file.

- Phil
...where DIR is the name of a directory/folder containing the images.  On Mac/Linux/PowerShell, use single quotes (') instead of double quotes (") around arguments containing a dollar sign ($).

RokkoRokko2019

redownloaded the updated bat file from previous post

dropped a folder with test file and it's xmp onto it

got this in command window

K:\300 - Applications Avatar\000 - Core 2 - Basic Utilities\UTIL - RENAME - EXIF - Exiftool>"K:\300 - Applications Avatar\000 - Core 2 - Basic Utilities\UTIL - RENAME - EXIF - Exiftool\exiftool-11.80\exiftool(-k).exe" -tagsfromfile %d%f.xmp "-testname<$ShotDate - %f.%e" -d "%Y-%m-%d  %H-%M %S" -ext mpeg -ext xmp "K:\300 - Applications Avatar\000 - Core 2 - Basic Utilities\UTIL - RENAME - EXIF - Exiftool\Test files"
'K:/300 - Applications Avatar/000 - Core 2 - Basic Utilities/UTIL - RENAME - EXIF - Exiftool/Test files/HD 151 - 99.mpeg' --> 'K:/300 - Applications Avatar/000 - Core 2 - Basic Utilities/UTIL - RENAME - EXIF - Exiftool/Test files/2008-10-25  01-55 45 - HD 151 - 99.mpeg'
'K:/300 - Applications Avatar/000 - Core 2 - Basic Utilities/UTIL - RENAME - EXIF - Exiftool/Test files/HD 151 - 99.xmp' --> 'K:/300 - Applications Avatar/000 - Core 2 - Basic Utilities/UTIL - RENAME - EXIF - Exiftool/Test files/2008-10-25  01-55 45 - HD 151 - 99.xmp'
    1 directories scanned
    0 image files updated
    2 image files unchanged
-- press RETURN --

The filenames were unchanged

The files are
HD 151 - 99.mpeg
HD 151 - 99.xmp

We're getting closer, I am sure and I seriously appreciate your time with this

Phil Harvey

Quote from: Phil Harvey on December 19, 2019, 01:03:46 PM
Nothing was changed because the .bat file is writing the "testname" tag instead of "filename".  Change this in the .bat file to actually rename the file.
...where DIR is the name of a directory/folder containing the images.  On Mac/Linux/PowerShell, use single quotes (') instead of double quotes (") around arguments containing a dollar sign ($).

RokkoRokko2019

Looking at the response from the command line

It appears to be working perfectly as the new filename is perfect in the readout

its simply not renaming the actual files themselves

RokkoRokko2019


Phil Harvey

The .bat file is a plain text file.  You can edit it with any plain text editor.  But I have done it for you.  See the attached file.

- Phil
...where DIR is the name of a directory/folder containing the images.  On Mac/Linux/PowerShell, use single quotes (') instead of double quotes (") around arguments containing a dollar sign ($).

RokkoRokko2019

Cheers Phil

It works perfectly now - the two bats are great as I can test then run the real rename

I had tried to open the bat in my notepad but the 'open with' option wasn't there in my Q-Dir browser

Anycase..

thank you so much for your personal time in perfecting this for me

Thanks to you I now have the means to update all these thousands of media files and access them in  chronological order.

Very very much appreciated
and thank you so much for taking the time to help a stranger.

Its rare to encounter and such a breath of fresh air.

I hope you have an awesome Xmas and a fantastic new year

thanks again

Zakk