News:

2023-03-15 Major improvements to the new Geolocation feature

Main Menu

Sync GPS from txt files

Started by Newsky, August 26, 2015, 04:26:12 AM

Previous topic - Next topic

Newsky

Thinking negatively about you (that you ignore for example) there is no reason. I'll wait as necessary. You always help, Phil. Thank!
Sorry for my english. I use Google translator

Phil Harvey

I just tried this out and it works fine for me on Windows.

I think you must be using an old version of exiftool.  Run "exiftool -ver" to check the version number.  The current version is 10.02.

This would explain why "%:1d" doesn't work (requires version 9.03 or later), and why you got the "unknown type for -charset option" warning (requires version 9.79 or later).

Also, I think you should use "e:\%:1d%f.%e", because "%:1d" seems to remove drive letter and first backslash:

exiftool -tagsfromfile e:\%:1d%f.%e -gps:all -@ Without_gps.txt

Or

exiftool -tagsfromfile e:/%:1d%f.%e -gps:all -@ Without_gps.txt

should also work.

- 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

exiftool -tagsfromfile f:\%:1d%f.%e -gps:all -@ Without_gps.txt -m -k  and
exiftool -tagsfromfile f:/%:1d%f.%e -gps:all -@ Without_gps.txt -m -k
It works fine in version 9.7.8.0, 9.0.3.0

in versions 9.9.9.9-10.0.0.2: FileName encoding not specified
if you add -charset filename=utf8:
Invalid filename encoding for e:/photo/Поездки/2013-07-19-Европа/04-Великобритания/03-Stonehenge/2013-07-23 11-08-46.jpg
Error opening directory e:/photo/Поездки/2013-07-19-Европа/04-Великобритания/03-Stonehenge/2013-07-23 11-08-46.jpg


It turns out, in the current version and subsequent perform this operation would be impossible? (in the presence of Cyrillic characters in the file path)  :(

Now I was able to recover all the geo data, thank you very much! I know that this function is useful to me more than once and it is a pity that this problem will have to use an older version, rather than the actual use. I am very grateful for the help!
Sorry for my english. I use Google translator

Phil Harvey

Quote from: Newsky on September 22, 2015, 02:38:11 PM
in versions 9.9.9.9-10.0.0.2: FileName encoding not specified

The behaviour should be the same as previous versions other than the added warning.  Did you check to see if the same files were written as when using an older version?

If you specify a filename encoding then it must be the right one or it definitely won't work.  Apparently your txt file is not encoded in UTF8.

- 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

Quote from: Phil Harvey on September 24, 2015, 05:09:26 PM
Apparently your txt file is not encoded in UTF8.

- Phil
I was very uncomfortable. This was also a problem. I have not checked the file encoding. Everything works great! Now I will not forget about coding! Thank you, Phil!
Sorry for my english. I use Google translator