errors in moving photos to folders according to GPS
Hello, I'm new here, I tried to search in forum, but didn't find any help.
I have big folder of photos taken in one year. I'd like to sort them by moving them to subfolders like this:
\<Img Year>\<Img Year>-<Img Month>\<Img DateOriginal:yyyy-mm-dd> <GPS Country> <GPS City>
It works fine with files which have GPS data in Exif. But there are also photos without GPS data, which end up as errors and they are not moved anywhere. I understand there is no Country or City to them, but I'd like to sort them to folder by date at least. I have to move them separately in the second step with this pattern:
\<Img Year>\<Img Year>-<Img Month>\<Img DateOriginal:yyyy-mm-dd>
I have also tried to use the fallback text like this:
\<Img Year>\<Img Year>-<Img Month>\<Img DateOriginal:yyyy-mm-dd> <GPS Country|> <GPS City|>
but it didn't help neither.
Isn't there any way to move all photos in one step, please?
I have big folder of photos taken in one year. I'd like to sort them by moving them to subfolders like this:
\<Img Year>\<Img Year>-<Img Month>\<Img DateOriginal:yyyy-mm-dd> <GPS Country> <GPS City>
It works fine with files which have GPS data in Exif. But there are also photos without GPS data, which end up as errors and they are not moved anywhere. I understand there is no Country or City to them, but I'd like to sort them to folder by date at least. I have to move them separately in the second step with this pattern:
\<Img Year>\<Img Year>-<Img Month>\<Img DateOriginal:yyyy-mm-dd>
I have also tried to use the fallback text like this:
\<Img Year>\<Img Year>-<Img Month>\<Img DateOriginal:yyyy-mm-dd> <GPS Country|> <GPS City|>
but it didn't help neither.
Isn't there any way to move all photos in one step, please?
Reply to #1:
Hi duxis,
EDIT 2: Try replacing the spaces before and between GPS tags with another character. It just occurred to me that that may be the reason for the failure - I've seen that before and it's vexing...
EDIT 3: Yeah, that seems to be the problem. MOVE batch mode works for me without the spaces, otherwise just as you had it. I used underscores in place of spaces.
If you don't like the underscores at the end you can use this script; set batch mode to RENAME:
item.newPath = item.path + app.parseTags('<DateTimeOriginal:YYYY>\\<DateTimeOriginal:YYYY-MM>\\<DateTimeOriginal:yyyy-mm-dd> <GPS Country|""> <GPS City|"">' ) ;
let np = item.newPath.replace( " ", "" ) ;
item.newPath = np + "\\"
NOTE: I used <DateTimeOriginal> for dates, but you can use whatever works best for you in those places.
Best,
DF
Hi duxis,
EDIT 2: Try replacing the spaces before and between GPS tags with another character. It just occurred to me that that may be the reason for the failure - I've seen that before and it's vexing...
EDIT 3: Yeah, that seems to be the problem. MOVE batch mode works for me without the spaces, otherwise just as you had it. I used underscores in place of spaces.
If you don't like the underscores at the end you can use this script; set batch mode to RENAME:
item.newPath = item.path + app.parseTags('<DateTimeOriginal:YYYY>\\<DateTimeOriginal:YYYY-MM>\\<DateTimeOriginal:yyyy-mm-dd> <GPS Country|""> <GPS City|"">' ) ;
let np = item.newPath.replace( " ", "" ) ;
item.newPath = np + "\\"
NOTE: I used <DateTimeOriginal> for dates, but you can use whatever works best for you in those places.
Best,
DF