photools.com Community

IMatch Discussion Boards => IMatch Scripting and Apps => Topic started by: ubacher on July 14, 2017, 11:21:03 AM

Title: Finding the current folder(s)
Post by: ubacher on July 14, 2017, 11:21:03 AM
To do a search over the current folder(s) I need to specify the folder(s).

What is the best way to get the folder? Do I have to get the files in the selected folders and extract
the paths i.e folder(s) from the files?

Another idea: I can get the files and search over the list of files. This way I don't need the folder.
Title: Re: Finding the current folder(s)
Post by: Mario on July 14, 2017, 03:32:06 PM
There is an idlist for that.
Title: Re: Finding the current folder(s)
Post by: ubacher on October 05, 2017, 09:10:09 PM
The idlist is selectedFolders

This allows me to get all the files in the selected Folder.
What if there are no files in it and I need to get the folders name?

How to I get the selected Folders name?
Title: Re: Finding the current folder(s)
Post by: Mario on October 05, 2017, 10:07:53 PM
This idlist contains the ids of all selected folders.
Use it with the /folders endpoint to get information about the folders.
Title: Re: Finding the current folder(s)
Post by: ubacher on October 06, 2017, 07:49:33 AM
Ah, OK.
I guess the description in Imatch Documetation needs correcting. It says:
QuoteThis idlist contains all files in the active file window (before filters are applied).
This is basically the total set of files that is loaded into the scope before filters etc. are applied.
Title: Re: Finding the current folder(s)
Post by: Mario on October 06, 2017, 09:12:58 AM
Copy&Paste error, sorry.
There was also a wrong statement in the documentation for ...files.total.
All updated now.