File rename sequence - ignore extension?

Started by mickdugan, June 15, 2017, 02:33:49 PM

Previous topic - Next topic

mickdugan

Hi,

I'm renaming a sequence of files like this:

'-filename<CreationDate' -d %Y%m%d-01%%-.3nc-00.%%le

The only problem is that the sequence resets when the file type changes even though the actual filename is the same.

How can I ignore the extension when renaming with sequence?

Thanks!

Phil Harvey

You could try doing it in two steps:

1. exiftool '-filename<CreationDate' -d %Y%m%d-01%%-.3nc-00.xxx DIR

2. exiftool '-filename<%f.$filetypeextension' -ext xxx DIR

Of course, the second stage relies on ExifTool's file identification, so some extensions may change.

- 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 ($).

mickdugan

Thanks. Although I'm not sure what that should do. I ran it but received an error.

Just to clarify, the problem is that I'm getting this:

20151225-01-001-00.mov
20151225-01-001-00.mp4
20151225-01-002-00.mov
20151225-01-003-00.mov

But I want this:

20151225-01-001-00.mov
20151225-01-002-00.mp4
20151225-01-003-00.mov
20151225-01-004-00.mov

Phil Harvey

What was the error?

The first command renames everthing to .xxx then the second changes the extensions back again.

- 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 ($).