ExifTool Forum

ExifTool => Newbies => Topic started by: Newsky on July 11, 2016, 12:24:36 PM

Title: Hardlink and ExifTool
Post by: Newsky on July 11, 2016, 12:24:36 PM
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
(http://img.maryno.net/preview/7663d2f1eab01057e76d3b206fe797f7/30cb3140e1b6f22ab246f351800c248d.gif) (http://img.maryno.net/images/7663d2f1eab01057e76d3b206fe797f7/30cb3140e1b6f22ab246f351800c248d.png)
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
Title: Re: Hardlink and ExifTool
Post by: Phil Harvey on July 11, 2016, 12:27:10 PM
Thanks for pointing out this broken link in the documentation.  I have fixed this.  Here is the correct link to the Extra Tags documentation (https://exiftool.org/TagNames/Extra.html).

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

- Phil
Title: Re: Hardlink and ExifTool
Post by: Newsky on July 11, 2016, 12:49:54 PM
Thank you! But unfortunately, I did not understand how to do it  :-[
Title: Re: Hardlink and ExifTool
Post by: Phil Harvey on July 11, 2016, 01:35:46 PM
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
Title: Re: Hardlink and ExifTool
Post by: Newsky on July 11, 2016, 04:42:26 PM
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:
(http://img.maryno.net/preview/4c530085b1389008d0c1f2a04ebfe0fb/c960512c67be51beea623b470d556c67.gif) (http://img.maryno.net/images/4c530085b1389008d0c1f2a04ebfe0fb/c960512c67be51beea623b470d556c67.png)
exiftool -charset Cyrillic "-hardlink<datetimeoriginal" -d "d:/2/%Y/%m-%B/%%f.%%e" -r "d:\My documents\Desktop\1" -k
Title: Re: Hardlink and ExifTool
Post by: Phil Harvey on July 11, 2016, 10:05:27 PM
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
Title: Re: Hardlink and ExifTool
Post by: Newsky on July 12, 2016, 07:57:51 AM
without lines: -charset Cyrillic No change  :(
Title: Re: Hardlink and ExifTool
Post by: Phil Harvey on July 13, 2016, 08:13:27 AM
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
Title: Re: Hardlink and ExifTool
Post by: Phil Harvey on July 13, 2016, 04:11:17 PM
I have found a Perl module (http://search.cpan.org/~rboisvert/Win32-LongPath-1.03/lib/Win32/LongPath.pm) 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
Title: Re: Hardlink and ExifTool
Post by: Newsky on July 18, 2016, 07:41:45 AM
I will wait with impatience! Thank you for your help, Phil!