Call Renamer from a script

Started by DavidOfMA, November 25, 2014, 10:19:12 PM

Previous topic - Next topic

DavidOfMA

It would be very helpful to be able to call the Renamer from a script. I

n IMatch 3.6, I was a me to create a batch file that copied files from my SD card, called the Adobe DNG converter to convert the RAW files, started IMatch, and inside IMatch renamed the files and assigned default categories. When I came back to the computer, all that was left to do was add additional categorizing.

In IMatch 5, this single process becomes a 3-step process. I run a batch file to copy the image files and convert to DNG, then start IMatch. Then I manually run the Renamer. Then I run a script to categorize. 

Thanks for considering this request.

David

Mario

1. I think this was requested and discussed before. Did you check other feature requests?

2. If you run a script anyway, why don't you rename the files in your script? Everything that is done by the Renamer can also be done from a script, including rename, move, copy and categorize.
-- Mario
IMatch Developer
Forum Administrator
http://www.photools.com  -  Contact & Support - Follow me on 𝕏 - Like photools.com on Facebook

Ferdinand

Quote from: Mario on November 25, 2014, 10:24:25 PM
Everything that is done by the Renamer can also be done from a script, including rename, move, copy and categorize.
Are buddy files handled automatically when using the Database.RenameFile method?  (The help file does not say, and my recollection is that they weren't when using the equivalent method in 3.6.)

DavidOfMA

I did look for other, similar requests and didn't see them. The main problem I'm having with Imatch 5, I now remember, is there doesn't seem to be a way to trigger a rescan of my "ingestion" folder tree. In IMatch 3, I used a Basic routine written by another user to read the files, then renamed them, then categorized. All this happened serially, so I could start my batch file, go do something else, and find IMatch opened to my New Photos category ready to complete the process. So perhaps the request should instead be for a way to rescan a folder tree from within a script.

ubacher

QuoteSo perhaps the request should instead be for a way to rescan a folder tree from within a script.

If I recall correctly that too was requested quite some time back.  I would be a happy man if I could do this!

DavidOfMA

Quote from: Mario on November 25, 2014, 10:24:25 PM
2. If you run a script anyway, why don't you rename the files in your script? Everything that is done by the Renamer can also be done from a script, including rename, move, copy and categorize.

Also, for a non-programmer like me, it is much easier to modify a naming scheme in the Renamer than it would be to do so in a script. Being able to call the Renamer from the script, with a named preset as a parameter, adds that ease of renaming, copying, and moving to scripting in a way that is more accessible than it otherwise would be.

Mario

Quote from: DavidOfMA on November 25, 2014, 10:53:12 PM
So perhaps the request should instead be for a way to rescan a folder tree from within a script.
You can use the Rescan method available in the database class. Does this not work for you?
-- Mario
IMatch Developer
Forum Administrator
http://www.photools.com  -  Contact & Support - Follow me on 𝕏 - Like photools.com on Facebook

Ferdinand

Quote from: Mario on November 26, 2014, 08:00:41 AM
You can use the Rescan method available in the database class. Does this not work for you?

I haven't tried it, but reading the help file suggested to me that it rescanned files already in the DB, not new files that weren't.  I came to this conclusion because the input parameter is of type Files, i.e. already in the DB.  If you want to scan new files added recently to a folder, it didn't appear to me that it could do this.  I think a method to rescan a folder would be useful.

ubacher

Quote.....rescanned files already in the DB, not new files that weren't.

I tried the rescan some time back - I think it was also after suggestion by Mario - and found it did not do anything useful for me.