Tryign to import and create subfolders (conditionally) using EXIF/IPTC dates?

gaikokujinkyofusho
Posts: 75
Joined: 20 Jan 07 16:35

Tryign to import and create subfolders (conditionally) using EXIF/IPTC dates?

Post by gaikokujinkyofusho » 22 Jan 17 0:29

A few questions now that I think of it, though all closely related. First, I noticed an "if metadata exists" option in the custom defined subfolder section, which, since my collection is a bit messy, made me wonder if it is possible to specify (in the folder and file name import/renaming section) something like:

If EXIF DateTimeDigitized Then use in folder/file names
if not DateTimeDigitized
then go to IPTC DateTimeTaken
if not DateTimeTaken
then go to IPTC DateCreated
If not DateCreatedthen do not import

Is that possible?

Closely related, I was already trying to use the DateTimeDigitized feild (it *looks* like PS kinda does what I was refering to above and uses available metadata, starting with DateTimeDigitized?) and I tried:

To start off I tried going to import and specifying (using the convient pull down menus)

%exif:DateTimeDigitized \ %yyyy - %mm \ %yyyy - %mm - %dd \

But every time I do it gives me the following (format) output

YYYY-mm\filename

I don't understand since in the little "preview" it shows

2004:02:07 02:38:19\2004-02\2004-02-07\

The obvious problem would be that ":" are not allowed in win file names but I had assumed that PS would put in something else like an "_"?

What am I doing wrong and/or how do I get it to express the DateTimeDigitized with out the ":"

Thx in advance!
M$ Win10 x64, 16gb ram w/ i5 proc
Photo Supreme build 2.2.5.1045

sanphotgn
Posts: 373
Joined: 26 Aug 07 18:06

Re: Tryign to import and create subfolders (conditionally) using EXIF/IPTC dates?

Post by sanphotgn » 22 Jan 17 23:29

I might be able to answer a portion of your question.

You can use the Replace macro to replace the ":" with the "_".
Click.png
Click.png (27.07 KiB) Viewed 1189 times
Replace.png
Replace.png (31.75 KiB) Viewed 1189 times
Replace Text Part.png
Replace Text Part.png (15.29 KiB) Viewed 1189 times
Photo Supreme 3.3.0.2602 (64 bits) (Windows)

gaikokujinkyofusho
Posts: 75
Joined: 20 Jan 07 16:35

Re: Tryign to import and create subfolders (conditionally) using EXIF/IPTC dates?

Post by gaikokujinkyofusho » 23 Jan 17 20:56

Thank you for the support. I took a look and attempted your suggestion but couldn't find where you did it. I am using v2 and noticed you are using v3, is this only available in v3? My file/subfolder dialog box looks like the attached. Thoughts?
Untitled.png
Untitled.png (70.38 KiB) Viewed 1146 times
M$ Win10 x64, 16gb ram w/ i5 proc
Photo Supreme build 2.2.5.1045

User avatar
fbungarz
Posts: 3117
Joined: 08 Dec 06 5:03
Location: Galapagos, Ecuador

Re: Tryign to import and create subfolders (conditionally) using EXIF/IPTC dates?

Post by fbungarz » 23 Jan 17 21:05

Version 3 is a considerable upgrade and well worth it. I don't quite remember how this previously worked, but looking at your screenshot it seems you are not trying to set up a folder/subfolder renaming rule, but a file naming rule!
You should be aware that PSu can do both: rename the files that you are importing AND put these files into folders named according to a specific rule. In both cases you can use macro-codes that use the exif data in your files for setting up these rules.
At the top of your screenshot it says "file naming", but the title of your post says you are trying to create named subfolders. Could you be more specific?
I believe even in version 2 these should be separate dialogs ...

gaikokujinkyofusho
Posts: 75
Joined: 20 Jan 07 16:35

Re: Tryign to import and create subfolders (conditionally) using EXIF/IPTC dates?

Post by gaikokujinkyofusho » 23 Jan 17 21:25

Sorry, I should have been more clear.

Originally (and still) I wanted to organize files according to the file EXIF (or more accurate metadata date, EXIF, or if that doesn't exist, IPTC, or if that doesn't exist GPS). Since I am not used to the box for setting up these renaming masks I (re)decided to just start on filename since the ":" limitation applies to filenames as well as directories and the dialog boxes for filename masks and folder masks seems to be pretty much identical (if I understand how to do one I hope I will understand the other).
M$ Win10 x64, 16gb ram w/ i5 proc
Photo Supreme build 2.2.5.1045

User avatar
fbungarz
Posts: 3117
Joined: 08 Dec 06 5:03
Location: Galapagos, Ecuador

Re: Tryign to import and create subfolders (conditionally) using EXIF/IPTC dates?

Post by fbungarz » 23 Jan 17 22:39

OK, makes sense.
Unfortunately I guess, I still won't be able to help much. I just checked and in version 3.3 (which I am currently using) both dialogs actually look like the screenshot that sanphotgn provided.

Looking at what you have posted I am seeing two possible issues:
(1)
The renaming dialog does not seem to be complete. The last line, %/notGPSExists seems to be missing a statement how to name a file if that info is not present.
(2)
I am not quite certain, but it looks like the file name example shown at the top of the screen is not valid; at least under Windows and Linux a ":" is not permitted as part of a file or folder name. Thus, a file name "2013:03:31 12:29:22.JPG" would most likely not be accepted by the operating system. PSu should be clever enough to change the ":" to a different, permitted symbol, but the dialog shown in your screenshot suggest it might not. That seems odd. You could try changing the delimiter for time and date in your operating system settings. Not sure if that would make any difference ...

All that said, I would actually recommend upgrading to version 3.3. According to the upgrade policies (http://www.idimager.com/WP/?page_id=525) you get a 30% discount, which is pretty decent considering how much better 3.3 actually works: http://www.idimager.com/WP/?page_id=1374
I think the revamped renaming dialog alone might be worth that investment ...

I know, it is still +/- 60 bucks, so perhaps still something you don't quite want to spend right now. In that case I recommend contacting customer support. I doubt many people here on the forum still use version 2.

sanphotgn
Posts: 373
Joined: 26 Aug 07 18:06

Re: Tryign to import and create subfolders (conditionally) using EXIF/IPTC dates?

Post by sanphotgn » 24 Jan 17 0:05

I don't remember, as well, how to do this in V2.

However, this may work. If your click around - maybe the down arrow on the field or the Text button, you want to enter the following:

Code: Select all

%exif:DateTimeDigitized{replace=:,_}
Photo Supreme 3.3.0.2602 (64 bits) (Windows)

gaikokujinkyofusho
Posts: 75
Joined: 20 Jan 07 16:35

Re: Tryign to import and create subfolders (conditionally) using EXIF/IPTC dates?

Post by gaikokujinkyofusho » 24 Jan 17 3:11

Well that worked, the {replace= ,_} that is, kinda.

I ran it a grand total of once and it ran perfectly, it was like this (I am sure)
%EXIFExists%/EXIFExists%exif:DateTimeDigitized{replace=:,-}.%FileExtension%NotEXIFExists%/NotEXIFExists
%IPTCExists%/IPTCExists%iptc:DateCreated{replace=:,-}.%FileExtension%NotIPTCExists%/NotIPTCExists%GPSExists
%/GPSExists%gps:GPSDateStamp{replace=:,-}.%FileExtension%/NotGPSExists

Then I tried modifying it a bit more (to get rid of the " " in between the date and times
%EXIFExists%/EXIFExists%exif:DateTimeDigitized{replace=:,-}{replace=: _}.%FileExtension%NotEXIFExists%/NotEXIFExists
%IPTCExists%/IPTCExists%iptc:DateCreated{replace=:,-}{replace=: _}.%FileExtension%NotIPTCExists%/NotIPTCExists%GPSExists
%/GPSExists%gps:GPSDateStamp{replace=:,-}{replace=: _}.%FileExtension%/NotGPSExists

Well that didn't work so i tried to go back to the first string, but it won't work now?! I then tried using the default origonal file name and nada, then tried changing the sub folder option and still nada, nada isn't qutie accurate, it now only copies the same three files (I've been running this on a test folder and copying not moving files). I can't find anything special about those three files, in their metadata... thoughts?
M$ Win10 x64, 16gb ram w/ i5 proc
Photo Supreme build 2.2.5.1045

sanphotgn
Posts: 373
Joined: 26 Aug 07 18:06

Re: Tryign to import and create subfolders (conditionally) using EXIF/IPTC dates?

Post by sanphotgn » 24 Jan 17 4:51

When you ran it the grand total of once, were you just trying to change the file name?

One tip: When something works, you can click on the Save button and save it. If you change it and the change doesn't work, you can always load (open) your previous creations by clicking on the Load button.

When you tried it again, had you deleted the photos from the database? Did you rename them back to their original name?

My example:

Code: Select all

%exif:DateTimeDigitized{replace=:,_}
In my example, I am replacing the : with a _

Note they are separated by a comma. That is required.

Your once and it ran perfectly example:

Code: Select all

%exif:DateTimeDigitized{replace=:,-}
You are replacing the : with a -

And they are separated by a comma.

In your second example that didn't work:

Code: Select all

%exif:DateTimeDigitized{replace=:,-}{replace=: _}
I believe you can only have one replace. When I try two replace, it doesn't work. What is kind of cool is you can test these small portions in a field before placing them into something bigger.
Photo Supreme 3.3.0.2602 (64 bits) (Windows)

sanphotgn
Posts: 373
Joined: 26 Aug 07 18:06

Re: Tryign to import and create subfolders (conditionally) using EXIF/IPTC dates?

Post by sanphotgn » 24 Jan 17 5:17

Try this:

Code: Select all

%exif:DateTimeDigitized{dateformat=yyyy-mm-dd-hh-nn-ss}
On my test photo, it creates:

2016-05-20-16-12-30

My original replace example created:

2016_05_20 16_12_30
Photo Supreme 3.3.0.2602 (64 bits) (Windows)

Mke
Posts: 256
Joined: 15 Jun 14 15:39

Re: Tryign to import and create subfolders (conditionally) using EXIF/IPTC dates?

Post by Mke » 24 Jan 17 17:01

While it doesn't solve the problem posted, I can suggest an alternative that might work - renaming the files outside PSU using ExifTool. It appears that it has the capability to use metadata to do so, and there's an example at http://www.sno.phy.queensu.ca/~phil/exiftool/#filename
...however I'm not sure that it can chain rules together to cater for all the cases, except in a Perl script.

gaikokujinkyofusho
Posts: 75
Joined: 20 Jan 07 16:35

Re: Tryign to import and create subfolders (conditionally) using EXIF/IPTC dates?

Post by gaikokujinkyofusho » 24 Jan 17 17:45

Well thank you, again!

Your "{dateformat=yyyy-mm-dd-hh-nn-ss}" worked very nicely (and this time I saved it as a separate rule file), but there is a caveat which I am now thinking is not related to the renaming/importing feature?

When I am importing, I have a "test" folder (that is flat, no sub dirs) that I have been using, and I have it set to *copy* files to a new folder and do *not* have it set to import the images into the catalog. I have used a variety of additional setting such as:
-verify ingested image with original
-set date/time qual to the moment the picture was taken
-duplicate handling is set for "skip"

the subfolder option (which I haven't modified) is the: date folder structure for image (yyyy\yyyy-mm\yyyy-mm-dd)

The file name option is now the updated version of the one you suggested:
%EXIFExists%/EXIFExists%exif:DateTimeDigitized{dateformat=yyyy-mm-dd-hh-nn-ss}.%FileExtension%NotEXIFExists%/NotEXIFExists%IPTCExists%/IPTCExists%iptc:DateCreated{dateformat=yyyy-mm-dd-hh-nn-ss}.%FileExtension%NotIPTCExists%/NotIPTCExists%GPSExists%/GPSExists%gps:GPSDateStamp{dateformat=yyyy-mm-dd-hh-nn-ss}.%FileExtension%/NotGPSExists

The test folder has 900+ files, mostly JPG but some TIFF. When I click on the "select by date" drop down menu it shows many different dates so PS is seeing the dates of the files (maybe not the EXIF/IPTC/GPS? but it worked once?) attached is a screen shot.

... Problem is, its still only importing 3 files?! The file name rename part is working perfectly for those 3 files and the (sub)folder creation/placement is also working well but again, only for those three files, I have tried comparing the metadata of those files to the others and there doesn't seem to be anything special about those files compared to the others (all the metadata is kinda messy, hence my wanting to come up with something that would use EXIF or IPTC or GPS).

Sorry for the lack of brevity, I wanted to make sure I gave enough info as some of my other posts have perhaps been too vague.

Thx!!!
Attachments
Untitled.png
Untitled.png (220.68 KiB) Viewed 1048 times
M$ Win10 x64, 16gb ram w/ i5 proc
Photo Supreme build 2.2.5.1045

sanphotgn
Posts: 373
Joined: 26 Aug 07 18:06

Re: Tryign to import and create subfolders (conditionally) using EXIF/IPTC dates?

Post by sanphotgn » 24 Jan 17 20:48

- Have these photos ever been copied / imported into the database in the past?
- Have you tried setting Duplicate Handling to Overwrite file?
- Before copying, are the images marked (green band with white arrow in upper right corner of image)?
- Do you delete the folder structure and images that were successfully created and copied before trying a new test?
- Have you tried just placing 10 photos in your test folder to copy, instead 900+?
Photo Supreme 3.3.0.2602 (64 bits) (Windows)

gaikokujinkyofusho
Posts: 75
Joined: 20 Jan 07 16:35

Re: Tryign to import and create subfolders (conditionally) using EXIF/IPTC dates?

Post by gaikokujinkyofusho » 25 Jan 17 3:33

- Have these photos ever been copied / imported into the database in the past?
Some of them yes.
- Have you tried setting Duplicate Handling to Overwrite file?
No, I erase the test destination folder each time.
- Before copying, are the images marked (green band with white arrow in upper right corner of image)?
... doh! I never noticed the green arrow!!!!! I was just selecting all (ctrl+A) and assuming that was it.
- Do you delete the folder structure and images that were successfully created and copied before trying a new test?
yes
- Have you tried just placing 10 photos in your test folder to copy, instead 900+?
yes.

Anyway, the "green arrow" appears to be the issue. I tried a few more times, it seems that after copying/importing (all successfully) I then go back and try to do it again and those 3 files are the only ones marked with the green arrow? Strange, but now that I know I guess not much of an issue, I will make sure all files are "checked" instead of just "selected"

Thanks so much to all on this thread!! The renaming seems to be working nicely now!
M$ Win10 x64, 16gb ram w/ i5 proc
Photo Supreme build 2.2.5.1045

gaikokujinkyofusho
Posts: 75
Joined: 20 Jan 07 16:35

Re: Tryign to import and create subfolders (conditionally) using EXIF/IPTC dates?

Post by gaikokujinkyofusho » 25 Jan 17 18:23

Well... I am back. It is apparently not quite as easy as I thought to take what was working for the file name and apply that to (sub)folders.

What I am trying now is a regular name but folder and sub folders based on either the EXIF/IPTC/GPS dates, this is what I tried:
%EXIFExists%/EXIFExists%exif:DateTimeDigitized{dateformat=yyyy}\%NotEXIFExists%/NotEXIFExists%IPTCExists%/IPTCExists%iptc:DateCreated{dateformat=yyyy}\%NotIPTCExists%/NotIPTCExists%GPSExists%/GPSExists%gps:GPSDateStamp{dateformat=yyyy}\%/NotGPSExists\%EXIFExists%/EXIFExists%exif:DateTimeDigitized{dateformat=yyyy-mm}\%NotEXIFExists%/NotEXIFExists%IPTCExists%/IPTCExists%iptc:DateCreated{dateformat=yyyy-mm}\%NotIPTCExists%/NotIPTCExists%GPSExists%/GPSExists%gps:GPSDateStamp{dateformat=yyyy-mm}\%/NotGPSExists

It kind of worked, some files were neatly moved to a sub folder in the format of \yyyy\yyyy-mm\
Untitled2.png
Untitled2.png (3.8 KiB) Viewed 959 times
but others I am not quite sure what happened, it looks like some image files were renamed to years (not put in sub folders), below is from fileexplorer
Untitled.png
Untitled.png (15.28 KiB) Viewed 959 times
I did get an error:
"Copy failed for E:\Pictures\TestSource Rename Test\IMG_20151220_151032252 (2016_01_07 16_38_07 UTC).jpg with error Failed on copy Unable to create file "E:\Pictures\TestDestination\1899" (0)"

thoughts?
M$ Win10 x64, 16gb ram w/ i5 proc
Photo Supreme build 2.2.5.1045

Post Reply