# Is there a Photo Import Date or Date Added stored in LR?



## Clem99 (Jan 20, 2014)

Hi everybody... I'm new to the forum, and I hope someone can answer this.  I migrated from Photoshop Elements and have been using LR5 for a while.  I'm really seeing the power and flexibility of LR over PSE, but one thing that I can't seem to find _anywhere _in LR is the ability to know when an image was imported into the catalog.  I've searched through the user's guide, books, blogs, forums... you name it.  It seems like this MUST be stored somewhere in the database since you can sort your displayed images based on the date added... so it has to know, right?  However, it seems you can't access that date anywhere.  I suppose I could create a metadata keyword during import, but then I need to remember to do that every time I import.  (I don't import into date folders, I usually organize that information by location or event.)

So does anyone know if there is a token that is available that would return the Import Date so I could use that in a Collection Filter or Export Preset for backup purposes?  I would be willing to dig into Plugin development if this information was available under the hood, but I couldn't even find it looking through the LR SDK documentation.  Photoshop Elements makes this field easily available, does LR fall short here?

Thanks in advance for any help.
Clem


----------



## Jim Wilde (Jan 20, 2014)

Hi, welcome to the forum.

There's no way to see that info, that I'm aware of. I've just had a quick look at a database but can't see that data in any obvious location, so I guess it's buried somewhere. 

Perhaps if you could explain a little more about why you need access to the import date, we may be able to offer alternative approaches. As you may have gathered, having access to the import date is a very rare request so it's perhaps not surprising that it's not displayed. There may well be a feature request already in existence at the official Adobe site, may be worth heading over there and adding your vote if you can find any existing request (link at the top of the page).


----------



## Clem99 (Jan 21, 2014)

Thanks, Jim.  Here's why I think it would be helpful.  The catalog is a database and that gets backed up weekly according to my LR preferences (or more frequently if I'm making a lot of changes).  My images are another matter.  I import them in and make a backup copy of them at that time.  So far so good.  The images are backed up and the catalog is backed up.  

The place where things get a little risky is when I use a plugin (e.g. NIK Viveza) to do some pixel-based edits.  In that case, it converts the raw file to TIFF and throws me into the plugin.  When I Save the image in the plug-in it returns me to LR with a new image file labeled IMG_1234Edit.tif.  And THIS image file is not backed up anywhere.  

So I was thinking I could make a Smart Collection called Incremental Backups that automatically filtered any images that were imported into LR after my last image backup date.  Then I could back these images up or even make a Publish preset that copied just these images to my backup drive.  Afterwards, I would simply change the date on the Smart Collection filter, and I'm all set for next time.  As long as the Smart Collection contains 0 photos, I know I have all my images saved in 2 places.  It's just how I tend to manage my backups... and it worked well using the Organizer in PS Elements.   I would do a full backup once in a long while, then a bunch of incremental backups in between.  And I was thinking that I could do a similar approach in LR.  I hope that explains it.


----------



## Linwood Ferguson (Jan 21, 2014)

Clem99 said:


> The catalog is a database and that gets backed up weekly according to my LR preferences (or more frequently if I'm making a lot of changes).  My images are another matter.  I import them in and make a backup copy of them at that time..........When I Save the image in the plug-in it returns me to LR with a new image file labeled IMG_1234Edit.tif.  And THIS image file is not backed up anywhere.



I don't know that you cannot do what you want, but I think you are working hard to make lightroom do something that your  backup program(s) should do for you.  Windows (and I presume Mac if you are of that persuasion) keep track of which files are changed/backed up.   Just have all your images (including plugin output) in a folder, and tell your favorite backup program "backup anything in this tree that changes". 

I think that otherwise you're going to get stuck in a bit of a recursion - even if you could get it to do what you want, then you have to get it to STOP doing it after you back up, so it only shows those changed and NOT backed up.  And that's just not something it seems to keep track of (but is definitely something the OS does).


----------



## Jim Wilde (Jan 21, 2014)

Got to agree with Linwood. You're trying to make Lightroom be what it's not designed to be, i.e. an image backup solution. Far simpler and more effective to incorporate your image backups into your system-wide backup scheme using an incremental backup utility.

What are you using to make a backup copy at the same time as you import? If you're using the "Make Second Copy" option, be aware that this really isn't a "backup" of the file structure that you create during import, i.e. it's really designed as an immediate insurance copy of the camera card, thus allowing the card to be re-used if necessary before the system-wide backup process is initiated. Using it as a true backup fails completely should you need to use it after a failure of the drive containing the originals, as the folder structures are completely different....this makes it virtually useless in the event of such a disk failure.


----------



## Clem99 (Jan 21, 2014)

Ferguson said:


> I don't know that you cannot do what you want, but I think you are working hard to make lightroom do something that your  backup program(s) should do for you.



Well, I can't argue with that.  I was hoping to just do this out of LR.  My PC data and all non-photography stuff is backed up separately, but due to disk space limitations, I tend to keep all my images on a separate external drive and this drive is not part of my "normal" PC backup, so I manually save these images when they are imported.  It's really just a matter of convenience; I tend to work on just a few images at a time, but I want to make sure that I have them in 2 places before I reformat the Compact Flash card.  To your point on recursion, what I would do (if I could do it) is perform the incremental backup, then update the Smart Collection filter to reflect the date of the latest backup, so from that point on it would only collect photos imported that were not backed up.  



Jim Wilde said:


> What are you using to make a backup copy at the same time as you import? If you're using the "Make Second Copy" option, be aware that this really isn't a "backup" of the file structure that you create during import, i.e. it's really designed as an immediate insurance copy of the camera card, thus allowing the card to be re-used if necessary before the system-wide backup process is initiated. Using it as a true backup fails completely should you need to use it after a failure of the drive containing the originals, as the folder structures are completely different....this makes it virtually useless in the event of such a disk failure.



I understand what you are saying.  I don't use the second copy feature; every photo is identified by a unique name/number, and I don't rename or move them after importing.  Oftentimes my backups are just burned to DVD because the cost is so cheap.  So if LR is missing an image, I know where to find it based on the file name.  I can see how that is making me stick to a fixed set of rules that are prone to human error, but it served me well with PS Elements and I was hoping I could carry that same procedure forward into LR and even automate it a bit with the Smart Collections and Publish presets.  It's a little more hassle if I need to recover, but for archive, I feel better about images on a DVD than on a drive that has moving parts and electronics waiting to fail.  

But my whole premise is dependent on knowing when the image was imported into the catalog and dog-gone-it, they just don't want to make that field available for some reason.    

Oh well, I guess I need to rethink my backup strategy and come up with something different.  I guess it's time to look into buying another hard drive or some cloud based storage.  Thanks for the info, guys.  You confirmed what I suspected.


----------



## Linwood Ferguson (Jan 22, 2014)

Keep in mind also that TIFF's, unlike raw, are frequently edited in place.  At least I do -- I often do "Edit original" if I need a few more touch-ups on a prior edit-in-photoshop, since I save them with layers all in.

So import date won't cut it -- you'd need some kind of modification date for non-raw (unless you never edit the original).


----------



## Jack Henry (Jan 25, 2014)

I was going to suggest ChronSync, but I just realised you're on a Windows based machine.

For those on Mac that may be wondering about backing up or synchronising modified files across multiple storage locations, ChronoSync is perfect. I use it across both Mac and Windows machines in order to maintain Synchronised audio files that I may be editing (I record Orchestras and Choirs) (Note, the Windows machine in this instance is just an added storage location for safety). Although ChronoSync doesn't get installed on the Windows machine, it sees it on the network and treats it like any other computer.

ChronoSync allows many different ways to backup, replace or synchronise files across many drives at once. It does this based on the time stamp of files, so for the OP it would have been ideal.

For instance, I have a ChronoSync 'document' (the instruction file) that backs up my wifes MacBook when she turns it on (and it joins the network). After the 'initial' full copy of files, the document is set to copy modified files from the MacBook, to an external USB HDD attached to my iMac. It also duplicates that copy to another drive. The same occurs with an old Windows XP laptop. When that is turned on, and the ChronoSync Scheduler sees it appear on the network, it too (selected files only) gets backed up to external USB HDD attached to the iMac.

But, you can also set ChronoSync to 'Synchronise' and back up in both directions (and keep deletions to any number of versions). You might use this when you are editing files on a MacBook and also a desktop iMac, so the files (and edits) are up to date on both machines.

You can also run the documents manually or as a set of documents performing a number of step in the process.


----------



## wandersman (Jan 31, 2017)

Hi I'm struggling with this and I have a bit of workaround.

1. Go to Metadata window
2. Click the little box next to filename.
3. Change File Naming to Date-File name. You'll now see a date appear in front of the filename like: 20151124-IMG_1688.PNG


----------



## rob211 (Jan 31, 2017)

Well, if you want to get the date imported of a file sent back as a TIFF, JPEG, etc, the I'd suggest you use the filesystem date as opposed to any of the exif/IPTC dates, which of course we prefer to keep as the original dates. But since the edited file is new, at least on a Mac it has a new filesystem date. That info isn't commonly shown in Lr, but you could use John Beardsworth's Search Replace Transfer plugin to take that filesystem date, say 2017-01-31, and put it into a metadata field that you could more easily use, like a keyword, title, etc. Then you could make a collection and depending where you put it maybe even sort, etc. And maybe even use the same keywords as a preset at import so you'd preserve the date there too.


----------



## Gnits (Jan 31, 2017)

I agree that it is better to be automated, outside of Lr.

On Windows there are two apps which may be of use. Both do the same thing, but each have pros and cons depending on what you want to do and your own level of expertise.

Beyond Compare ....Is a Windows (and now Mac also) which has different versions (eg. free, Workstation, Networked) which allows you to configure the Synch of New or Modified files from a folder or disk to a folder or disk.  You can save a specific configuration so it can easily be run and can also be scheduled. The schedule bit needs some techie skills. Its only criticism is that the number of options available can be overpowering for some.

Vica Versa is another tool for Windows environments. This has a better user driven scheduling feature.

My backup software of preference  for Windows is Macrium Reflect.  I use this in an automated way to back up my system at 6 am every morning and send me an email when it is finished. It then puts my Windows workstation back to sleep. Windows has its own backup software, but I prefer other tools.


----------



## wandersman (Jan 31, 2017)

I just tried the John Beardsworth plug-in and had trouble with it but that may be because I'm unfamiliar with it. I tried to Other- OS Date Created and put it in the Creator- Date Created field. Although I searched inside the IPTC meta-data window and the meta data presets window created by the program I didn't see this field. What I did see was that the filename had become twice as long: 10421515_10101041719926911_7043633653828617054_n.jpg . I think this is because I had two files selected when I started.


----------



## rob211 (Jan 31, 2017)

wandersman said:


> I just tried the John Beardsworth plug-in and had trouble with it but that may be because I'm unfamiliar with it. I tried to Other- OS Date Created and put it in the Creator- Date Created field. Although I searched inside the IPTC meta-data window and the meta data presets window created by the program I didn't see this field. What I did see was that the filename had become twice as long: 10421515_10101041719926911_7043633653828617054_n.jpg . I think this is because I had two files selected when I started.



I'm not sure what you're trying to do. It seems you're using something to automatically parse and rename your files. And putting the filesystem create date into IPTC date fields is gonna mean that you lose the date the image was created, which could create all kinds of problems.


----------



## wandersman (Jan 31, 2017)

I want to be able to see the file creation date. I'm using computer generated images and they are not created with the normal photo creation date. Therefore the system stamp would be an improvement. I didn't want to change the file name. I'd prefer to just have a good time stamp. But my worksround enabled me to see a date. Then I tried your methods in order to see if I could populate a date field...


----------



## Wernfried (Feb 1, 2017)

If you don't mind to query the SQLite database directly, you can use this query:


```
select img.id_local, img.captureTime, file.originalFilename, imp.importDate
from AgLibraryImport imp
    join AgLibraryImportImage impimg on imp.id_local = impimg.import
    join Adobe_images img on img.id_local = impimg.image
    join AgLibraryFile file on file.id_local = img.rootFile;
```

Best Regards
Wernfried


----------



## wandersman (Feb 1, 2017)

Wernfried said:


> If you don't mind to query the SQLite database directly, you can use this query:
> 
> 
> ```
> ...


 
Scary but interesting! Thank you...


----------



## Victoria Bampton (Feb 1, 2017)

Yeah, I'd hesitate to recommend anyone start messing around in the database directly. I don't think it's something we want to encourage.


----------



## Wernfried (Feb 2, 2017)

Victoria Bampton said:


> Yeah, I'd hesitate to recommend anyone start messing around in the database directly. I don't think it's something we want to encourage.



Well, do you have a better idea? As it looks like you cannot access the import time by the official Lightroom SDK, that's why I provide a workaround. 

btw, with this query you get also the full path of stored photos.


```
select img.id_local, imp.importDate,
    root.absolutePath || folder.pathFromRoot || file.originalFilename as full_name
from AgLibraryImport imp
    join AgLibraryImportImage impimg on imp.id_local = impimg.import
    join Adobe_images img on img.id_local = impimg.image
    join AgLibraryFile file on file.id_local = img.rootFile
    join AgLibraryFolder folder on folder.id_local = file.folder
    join AgLibraryRootFolder root on root.id_local = folder.rootFolder;
```


However, clearly I don't recommend such sulution to determine whether a file should be included in backup. I assume almost every proper backup application is able to detect new files, resp. changed files at your disc/folder. Use these capabilities rather than any home-made approach!

Best Regards
Wernfried


----------

