ExifTool Forum

ExifTool => Newbies => Topic started by: jason404 on March 14, 2019, 08:23:47 AM

Title: Rename video files with vertical resolution
Post by: jason404 on March 14, 2019, 08:23:47 AM
I have a load of video files which I want to rename with the vertical resolution at the end.

eg.  VideoFileExample1.mp4 renamed to VideoFileExample1.1080.mp4

How would I do this?  I was going to write a Windows batch or bash file using the FOR command, but it seems that ExifTool can do batch operations itself.

Thanks.
Title: Re: Rename video files with vertical resolution
Post by: Phil Harvey on March 14, 2019, 08:31:54 AM
Hi Jason,

Try this:

exiftool "-testname<%f.$imagewidth.%e" DIR

If this does what you want, then replace "testname" with "filename" to actually rename the files.

- Phil
Title: Re: Rename video files with vertical resolution
Post by: StarGeek on March 14, 2019, 11:20:52 AM
I think ImageHeight would be the appropriate tag.

Title: Re: Rename video files with vertical resolution
Post by: Phil Harvey on March 14, 2019, 11:25:11 AM
Right, thanks:

exiftool "-testname<%f.$imageheight.%e" DIR

- Phil
Title: Re: Rename video files with vertical resolution
Post by: jason404 on March 22, 2019, 07:06:22 AM
Brilliant, that worked.  Thanks Phil and StarGeek.

I only just realised that I had replies, as the forum settings don't seem to automatically set notifications for your own posts.