Hardlink and ExifTool

Started by Newsky, July 11, 2016, 12:24:36 PM

Previous topic - Next topic

Newsky

I want to create a hardlink all images in the folder, spreading them so "%Y/%m-%B" how to do it?
I wanted to read here, but the link does not work

so I tried, but obviously this is wrong
exiftool -r -charset Cyrillic "-Directory<DateTimeOriginal" -d "%Y/%B" "d:\My documents\Desktop\1" -hardlink="d:\2" -k
Sorry for my english. I use Google translator

Phil Harvey

Thanks for pointing out this broken link in the documentation.  I have fixed this.  Here is the correct link to the Extra Tags documentation.

You create a hard link by writing the HardLink tag.  The syntax is exactly the same as writing the FileName tag.

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

Newsky

Thank you! But unfortunately, I did not understand how to do it  :-[
Sorry for my english. I use Google translator

Phil Harvey

I'm not clear on exactly what you want, but is it something like this?:

exiftool "-hardlink<datetimeoriginal" -d "d:/2/%Y/%m-%B/%%f.%%e" -r "d:\My documents\Desktop\1"

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

Newsky

Yes! Yes, this is exactly what I need! Thank you, Phil! Just a small problem when you create a folder with the name of the month in the Cyrillic alphabet:

exiftool -charset Cyrillic "-hardlink<datetimeoriginal" -d "d:/2/%Y/%m-%B/%%f.%%e" -r "d:\My documents\Desktop\1" -k
Sorry for my english. I use Google translator

Phil Harvey

Yes.  Problem.  The HardLink feature won't deal well with special characters in Windows file names.  You may be able to get it to work by trial and error (what happens if you remove the -charset option), but I can't help much here right now.

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

Newsky

#6
without lines: -charset Cyrillic No change  :(
Sorry for my english. I use Google translator

Phil Harvey

Pity.  I checked, and the Windows file i/o libraries I'm using to handle the special characters in the file names don't support creating hard links. :(  So I don't see an easy solution to this.

- 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

I have found a Perl module that claims to support hard links for Windows files with Unicode characters.  I'll see if I can use this to fix the HardLink feature of ExifTool.

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

Newsky

I will wait with impatience! Thank you for your help, Phil!
Sorry for my english. I use Google translator