PDA

View Full Version : Programmatic way to map folders to PSE catalog


Markhail
February 22nd, 2009, 12:52 PM
I have backed up all the folders which are referenced in my catalog (so far as I know) both with a hard disk catalog copy and folder-by-folder. The issue is that the item count is off by about 20%; the folders have 20% more something than what PSE tells me I have in terms of images etc,

The question is , therefore, if there is a utility or enough bread crumbs scattered around so that I could get some batch reports:

1. All folders (and their drive location if known) that have images in the PSE catalog.

2. A list of image file titles by folder that are in the catalog.

If I can get that then I can use My Favorite Scripting Language to produce two other pieces of information:

-- what images are in folders but not in the catalog
-- what images are in the catalog but not in a folder that is supposedly backed up.

plus any others I can think of

dj_paige
February 22nd, 2009, 02:03 PM
If you know how to write SQL code, you can create such a utility, since the PSE catalogs are just databases. PSE5 and earlier are Microsoft Access databases, while PSE6 and later and SQLite databases.

Or, you could use the PSE Backup Catalog command and then you can be sure that everything is being backed up properly.

johnrellis
February 22nd, 2009, 02:24 PM
Which version of PSE?

PSE makes it surprising hard to discover how to get an accurate total number of cataloged items. I assume you’re looking at the total number of items in the lower-left status line. In PSE 6 and 7, that total doesn’t include photos buried in stacks or version sets. Also, by default it won’t include files you’ve marked as hidden or media types that are set not to show.

Here’s a quick way to get an accurate total:

1. View > Hidden Files > Show All Files
2. Ensure all types are checked in View > Media Types
3. Show All
4. Deselect Edit > Preferences > General > Show Closely Matching Sets For Searches
5. Find > By Filename, enter a nonsense filename, e.g. “a;lks9-09xjs01923sx”
6. In the Find Bar, click Options, and read out the total number of files XXX from “Show Results That Do Not Match (XXX)”. Note that if you actually select Show Results That Do Not Match, you’ll get a lower number in the status line that excludes stacks and version sets.

If your counts are still way off, then:

1. You can find images that aren’t currently in the catalog by doing Find > Get Photos And Videos > By Searching. This will list the folders that contain uncataloged images, along with the total number of such images.

2. You can use the free utility “psedbtool” with the “-csv” option to write out comma-separated text files listing the complete contents of your catalog:

http://www.johnrellis.com/psedbtool (http://www.johnrellis.com/psedbtool)

However, I always prefer to find in-program ways of solving my problems rather than scripting since, even though I’m an expert programmer, programming invariably takes longer than I expect.

dj_paige
February 22nd, 2009, 07:05 PM
Folder Location View will show you all of your folders that have at least one element in the Catalog.

johnrellis
February 22nd, 2009, 07:23 PM
Folder Location View will show you all of your folders that have at least one element in the Catalog.
In PSE 6 and 7 (not sure about 5), you need to be careful to look for the little photo icon on the upper-right corner of the folder icon. PSE will show all sibling folders of a folder that directly or indirectly contains a photo, but only folders that directly contain a photo will have the little photo icon in its corner.