ExifTool Forum

ExifTool => Newbies => Topic started by: antagarm on March 30, 2018, 09:57:31 AM

Title: Organize and rename simultaniusly
Post by: antagarm on March 30, 2018, 09:57:31 AM
As many of other people I have lots of non-organized photos on my hard drive. And of course there are thousands of duplicates.
I know than the best way to deal with this is dedup all my photos and than organize them somehow using ExifTool

The problem is that apparently I have too much data and duplicates, as a result two of well known solutions for dedup crashed during treating the data. So I decided to do something different - Organize by Date and than dedup folder by folder.

Here is my question: Is it possible using ExifTool organize photos by date (%Y-%m-%d), and at the same time renaming the files if there are duplicated names in the same folder?

Thanks for your answers
Title: Re: Organize and rename simultaniusly
Post by: Phil Harvey on March 30, 2018, 01:40:52 PM
Yes.  See this page (https://exiftool.org/filename.html) for details.

- Phil
Title: Re: Organize and rename simultaniusly
Post by: antagarm on March 30, 2018, 05:45:53 PM
Hi Phil,

Thank you for your response.
I went through this page but unfortunately I couldn't find an answer to my question, or my English level didn't allow me to understand it.

From what I understand, the page mostly talks about Rename and Move, but in my case I need Move and Rename. I'll explain it better:
I want the ExifTool to move my files to a  folder  and if a file with this name is already exist in this folder -rename a new one.

Is it possible?

Thank you,
Title: Re: Organize and rename simultaniusly
Post by: Phil Harvey on March 31, 2018, 08:23:48 AM
Move and rename are the same thing for ExifTool.  If the new file name includes a directory, then the file is moved too.

The command my be something like this:

exiftool "-filename<NEWDIR/${createdate}/%f%-c.%e" -d "%Y-%m-%d" -r DIR

- Phil
Title: Re: Organize and rename simultaniusly
Post by: antagarm on April 01, 2018, 02:14:20 PM
I don't want to rename all my 500k photos.
I want to organize my photos and rename only those that have the same name.

For example:

I have main folder OLD, it has OLD1 and OLD2 folders inside, and everyone has photo.jpeg inside.

As a result I want to have the following:  2018/03/photo.jpeg and 2018/03/photo-1.jpeg..
(The new name can be anything.)


Title: Re: Organize and rename simultaniusly
Post by: Phil Harvey on April 02, 2018, 07:18:04 AM
Yes.
Title: Re: Organize and rename simultaniusly
Post by: remco on February 18, 2023, 07:10:28 AM
But what is the command to perform that action? Thus, rename ONLY in case there is a file with the same name already?
Title: Re: Organize and rename simultaniusly
Post by: Phil Harvey on February 18, 2023, 07:44:52 AM
The command I gave does this.  The %c formatting code adds a number only if necessary to avoid a name collision, and %-c adds a dash followed by a number only if necessary.

- Phil