Way to import category assignments without imcsx

Started by SpencerH, July 15, 2020, 09:32:30 AM

Previous topic - Next topic

SpencerH

I'm looking for a way to set categories in bulk (or iteration).

I had an imatch 5 instance with about 25000 pix and thousands of category assignments.  That computer won't boot.

I have multiple backups of the database, but they won't open in imatch 2018 or 2019 ('locked' issue).

I was able to import my .imcs file into my iMatch 2020 database to get the category structure in, and the files are all in the same fully qualified paths as before, but they don't have any category assignments set.

I have the all-data export from the imatch 5 database, so I have the fully qualified categories e.g.:
"Peoples.David,Peoples.Spencer,Downtown,Projects.Calendars.2005 for 06 Calendar Project.CALENDAR DOGS"

but I don't have an .imcsx file, and can't generate one because the old computer is dead.

I know how to create a .csv, .tsv, or .json file (and if I _really_ have to an xml file) with the fully qualified filepaths, and I can do multiple categories on one line, as in the above, or each assignment on it's own line, e.g.:

"c:\picture folder\sample.jpg"   \t      "Peoples.David"
"c:\picture folder\sample.jpg"   \t      "Peoples.Spencer"

Is there a non-icmsx-file format the Category Import app will digest?

Or does someone have a recommendation for an alternate way to set the categories?

I've got the data.  I'm just trying to figure out how to push it in.

Thanks for your help.






Mario

QuoteI have multiple backups of the database, but they won't open in imatch 2018 or 2019 ('locked' issue).

With "locked" do you mean that the Trial version of IMatch 2020 opens databases older than 30 days (including IMatch 5 databases) only in read-only mode?
Because this is the only locking IMatch does...

QuoteI was able to import my .imcs file into my iMatch 2020 database to get the category structure in, and the files are all in the same fully qualified paths as before, but they don't have any category assignments set.

This should work if the files are on the same media (diskl!) and the same physical path.
Else use the checksum method, which finds the files wherever they are (at a slight risk of assigning a file wrong).

IMCSX is just the newer category format introduced in IMatch 5. IMCS is from IMatch 3 I believe.
-- Mario
IMatch Developer
Forum Administrator
http://www.photools.com  -  Contact & Support - Follow me on 𝕏 - Like photools.com on Facebook

SpencerH

These are not trial versions, I have the paid versions of 5, 2018, 2019, and 2020.

When  imatch 2018/2019 opens the imatch 5 database, imatch says it needs to convert it to the newer format, but then imatch throws an error messagebox saying it can't convert it because the database is locked or there's a permissions issue with files (log below).  But I'm hoping we don't need to troubleshoot that unless you think it's the best strategy.

My .icms file (which imported successfully) is a very small file containing only the list of category tags, with no information about which files belong to the categories.

The file->category assignments are in a much larger .csv file generated by imatch 5, using an imatch 5 export format:

"File Name"   "Full File Name"   "File Name w/o Extension"   "Friendly Folder Name"   "File URI"   "Folder Name"   "Folder URI"   "Width"   "Height"   "Size"   "File Format"   "Checksum"   "Last Modified"   "Last Updated in Database"   "Categories"   "BPP"   "Width and Height"   "Image Object Identifier (OID)"   "Categories (fully qualified)"   "Media ID"   "Rating"   "Label"   "EXIF Date"   "EXIF Time"   "Categories (incl. indirect)"   "Categories (incl. indirect, fully qualified)"   "Title"   "Description"

I've tried the .csv file in the imatch 2020 Category Import app, but rather than tagging the files with the categories, it creates a new category item for every photo file in the text export file.

When I try the "Import CSV Files" app, imatch shows the available columns, and I can map "Full File Name" to the checkbox "File Name?", but for the Import Into selection, I can't locate imatch categories (and the split repeatable tags is set to comma (nice work with that BTW!) but not sure the manner in which it would handle multiple tags).

Is there a category option there?

Thanks again.

-Dave

These are just repeats of the .csv file vertically for convenience:

"File Name"
"Full File Name"
"File Name w/o Extension"
"Friendly Folder Name"
"File URI"
"Folder Name"
"Folder URI"
"Width"
"Height"
"Size"
"File Format"
"Checksum"
"Last Modified"
"Last Updated in Database"
"Categories"
"BPP"
"Width and Height"
"Image Object Identifier (OID)"
"Categories (fully qualified)"
"Media ID"
"Rating"
"Label"
"EXIF Date"
"EXIF Time"
"Categories (incl. indirect)"
"Categories (incl. indirect, fully qualified)"
"Title"
"Description"





logging in user david on machine DESKTOP
07.06 01:48:14+    0 [2404] 01  W>    'no such table: user'
  • for: SELECT rowid,name,password FROM user where name = ?1  'v:\develop\imatch5\src\imsq\imsqlite.cpp(1049)'
    07.06 01:48:14+    0 [2404] 01  W>    'no such table: user' [21]  'v:\develop\imatch5\src\imsq\imsqlite.cpp(2645)'
    07.06 01:48:14+    0 [2404] 01  W>    SELECT rowid,name,password FROM user where name = ?1  'v:\develop\imatch5\src\imsq\imsqlite.cpp(2646)'
    07.06 01:48:14+    0 [2404] 01  W>    'no such table: user' [21] for: INSERT INTO user (name,password) VALUES (?1,?2)  'v:\develop\imatch5\src\imsq\imsqlite.cpp(1049)'
    07.06 01:48:14+    0 [2404] 01  W>    'no such table: user' [21]  'v:\develop\imatch5\src\imsq\imsqlite.cpp(2645)'
    07.06 01:48:14+    0 [2404] 01  W>    INSERT INTO user (name,password) VALUES (?1,?2)  'v:\develop\imatch5\src\imsq\imsqlite.cpp(2646)'
    07.06 01:48:14+    0 [2404] 00  E>    IMException: 10505 - 'Cannot map error code to message!'. System code: 203  'v:\develop\imatch5\src\imengine\imengine5.cpp(3875)'
    07.06 01:48:14+    0 [2404] 00  M>     >  4 CIMEngine5::Close  'v:\develop\imatch5\src\imengine\imengine5.cpp(4158)'
    07.06 01:48:14+    0 [2404] 00  M>      >  5 PTMDTemplateManager::Close  'v:\develop\imatch5\src\imengine\ptmdtemplate.cpp(315)'
    07.06 01:48:14+    0 [2404] 00  M>      <  5 PTMDTemplateManager::Close

Mario

You cannot import categories via the CSV import feature. This is for importing data into metadata and Attributes.

When the .imcs file contains only the category names but no file assignments it was created without the "Add file links" option in IMatch 3.

The problem is that your database is missing an important table, which was introduced many years ago to IMatch. Usually this table is automatically added when IMatch converts older databases. Not sure why this does not work with your database. Strange.

From your description I understand that this database was created by IMatch 5 (?) and never opened/converted with IMatch 2017/2018/2019 - you jump straight from the legacy IMatch 5 version to IMatch 2020?

To fix this problem, and to make IMatch 2020 open your database directly, we need to repair the database.
You can upload the database to your cloud space and send me a link. I can then try to fix the database and send it back to you.

Or you contact me via email (see support email address) and I will send you a small tool and instructions.
-- Mario
IMatch Developer
Forum Administrator
http://www.photools.com  -  Contact & Support - Follow me on 𝕏 - Like photools.com on Facebook