How can I get a list of rated files in folders/subfolders?

I use a star rating system to select which photos I need to work on. Each subject has their own folder. Within each subject's folder are subfolders, one for each time I have a photo shoot with them. The hierarchy looks something like this.....
MainFolder
     Subject1
          Shoot1
          Shoot2
     Subject2
          Shoot1
     Subject3
          Shoot1
          Shoot2
          Shoot3
          Shoot4
     Subject4
          Shoot1
And so on. The image files are within each "Shoot" folder. The thing I'd like to accomplish is to have a way that I can start with the main folder and check through all subfolders where image files are and build a listing of all rated image files that I can parse through to see which images I need to work on.
Ideally I'd like to have them sorted from highest to lowest rating. I can do this by stepping through each folder and file within, checking the rating of each file, and continuing. What I'd really prefer to speed things up is to know if there is a way to check a folder's contents and filter it by rating. First, extract all the 5-star rated filenames, then 4-star, then 3-star, and so on. I cannot find anything in the documentation for Bridge scripting that allows for sorting/filtering folder contents. I currently have over 40,000 image files so checking through them one at a time even with a script would be a task which is why I'd like to know if there is a scripting method to filter out ratings within folders.
Any help would be greatly appreciated. I can write the script...at least most of it I think...but things would go so much nicer for me with a filter/sort.

How right you are Mark, you know I am gradually going senile
This will do the same but will allow re-runs without re-creating the collections or adding duplicates.
#target bridge
var folders =[];
var topLevel = app.document.presentationPath;
folders = FindAllFolders(topLevel, folders);
folders.unshift(topLevel);
//Create 5 collections to put the files into
var FiveStars = FourStars = ThreeStars = TwoStars = OneStar = undefined;
var colls =app.getCollections();
for(var a in colls){
    if(colls[a].name == "Five Stars") FiveStars= colls[a];
    if(colls[a].name == "Four Stars") FourStars= colls[a];
    if(colls[a].name == "Three Stars") ThreeStars= colls[a];
    if(colls[a].name == "Two Stars") TwoStars= colls[a];
    if(colls[a].name == "One Star") OneStar= colls[a];
if(FiveStars == undefined) FiveStars = app.createCollection("Five Stars");
if(FourStars == undefined) FourStars = app.createCollection("Four Stars");
if(ThreeStars == undefined) ThreeStars = app.createCollection("Three Stars");
if(TwoStars == undefined) TwoStars = app.createCollection("Two Stars");
if(OneStar == undefined) OneStar = app.createCollection("One Star");
for(var a in folders){
var PictureFiles = Folder(folders[a]).getFiles(/\.(jpg|jpe|jpeg|gif|eps|dng|bmp|tif|tiff|psd|crw|cr2|rle|dib|cin|dpx|ps|pcd|pict|vda|icb|vst|wbm|sct|pbm|flm|psb|exr|pcx|pdp|nef|dcr|dc2|erf|raf|orf|tga|mrw|mos|srf|pic|pct|pxr|pdd|pef|png|x3f|raw)$/i);
for(var p in PictureFiles){
var Rating  = new Thumbnail(PictureFiles[p]).rating;
if(Rating == undefined) Rating = 0;
switch(Number(Rating)){
    case 0 : break; /* No Rating */
    case 1 : if(!app.isCollectionMember(OneStar,new Thumbnail(PictureFiles[p]))) app.addCollectionMember(OneStar,new Thumbnail(PictureFiles[p])); break;
    case 2 : if(!app.isCollectionMember(TwoStars,new Thumbnail(PictureFiles[p]))) app.addCollectionMember(TwoStars,new Thumbnail(PictureFiles[p])); break;
    case 3 : if(!app.isCollectionMember(ThreeStars,new Thumbnail(PictureFiles[p]))) app.addCollectionMember(ThreeStars,new Thumbnail(PictureFiles[p])); break;
    case 4 : if(!app.isCollectionMember(FourStars,new Thumbnail(PictureFiles[p]))) app.addCollectionMember(FourStars,new Thumbnail(PictureFiles[p])); break;
    case 5 : if(!app.isCollectionMember(FiveStars,new Thumbnail(PictureFiles[p]))) app.addCollectionMember(FiveStars,new Thumbnail(PictureFiles[p])); break;
    default : break;
function FindAllFolders( srcFolderStr, destArray) {
var fileFolderArray = Folder( srcFolderStr ).getFiles();
for ( var i = 0; i < fileFolderArray.length; i++ ) {
  var fileFoldObj = fileFolderArray[i];
  if ( fileFoldObj instanceof File ) {  
  } else {
         destArray.push( Folder(fileFoldObj) );
  FindAllFolders( fileFoldObj.toString(), destArray );
return destArray;

Similar Messages

  • Cisco NSS324 - how can I get a list of opened files - similar to psfile

    I have a Cisco NSS324. I need to determine what files are open and by what users.
    I have AD integration - so the users I am looking for are Windows users.
    for Windows servers we are using 'psfile' - how can we get a similar tool that works with the Cisco NSS324?
    thank you
    Calin

    Calin,
    Not to familar with window server using psfile. I know of a feature i use in the NSS to give me an idea what local/domain user are accessing. Under Administration-->System log settings click on System connection logs--> click options and select protocol you would like to monitor and then start logging. This will display any users accessing the NSS and there accessed resources. You can also send this information to your local syslog server and save the copy to your local NSS .
    Hope this helps,
    Jasbryan

  • How can I get a list of apps which are supported on ipod touch model ma623zo?

    How can I get a list of apps which are supported on ipod touch model ma623zo?
    It's about 6 years old I think.
    I have put the latest IOS on there (currently 3.1.3 (7E18)).
    I download apps from the app store but they often fail to launch. I assume they're incompatible.
    Is there a way to check which apps will work and which won't before I buy them?
    Thanks!

    I have no idea how my reply could be "misleading". I stated the exact situation: there are millions of apps in the iTunes Store, and providing a comprehensive, accurate list of which apps support which version(s) of iOS would be highly impractical. You can perhaps help with your search by going to AppShopper:
    http://appshopper.com/search/?search=iOS+3
    That will give you at least some starting points, but AppShopper is neither comprehensive nor completely accurate. I've found a number of apps listed there over the time the site has existed that either are no longer offered or which have been updated beyond the iOS version indicated. But it might help.
    Regards.

  • How can I get a list of database names from environment

    Hi,
    How can I get a list of database names from environment.
    I had found a method in JE API Docs named Environment.getDatabaseNames(), and i couldn't found the same method in Berkeley DB.
    I use java interface, is it supported?
    Thanks.

    Hello,
    I don't know if it would work for you, but have you checked the db_archive utility at:
    http://download.oracle.com/docs/cd/E17076_01/html/api_reference/C/db_archive.html
    Check the -s option.
    Thanks,
    Sandra

  • HT1420 how can I get a list of the computers that are currently authorized?

    I need to authorize my home computer after switching from PC to Mac. How can I get a list of which devices are currently authorized?

    There is no list.

  • Hi ,How can I get a list of all laptops or users with folder direction enabled or offline files enabled, be it sccm or poerwshell . i have struggled for a week.

    Hi ,how can I get a list of all laptops or users with folder direction enabled or offline files enabled, be it sccm
    or poerwshell . i have struggled for a week
    tchocr

    Hi,
    There is no such PowerShell command can achiev this. Maybe you can use a script to get the user name with folder redirection enabled. However, I am not familiar with writing script, and it would be better for you to ask in script forum below for professional
    assistance:
    http://social.technet.microsoft.com/Forums/en-US/home?forum=ITCG&filter=alltypes&sort=lastpostdesc
    Best Regards,
    Mandy
    Please remember to mark the replies as answers if they help and unmark them if they provide no help. If you have feedback for TechNet Subscriber Support, contact [email protected]

  • How can I get a list of purchased apps?

    Recently restored my iPhone from backup, and I need to download my apps.  How can I get a list of apps that I've downloaded/purchased?
    If I search for an app via the app store that I had previously installed, the Install icon turns into a Cloud with a down arrow symbol on it - there must be a way to get a list of all of these right?
    Anyone clever enough to solve this riddle?

    Open the App Store app, go to the Updates pane and tap Purchased.

  • How can I get a list of all workbooks

    Can anybody please tell me how can I get a list of all my workbooks that are on my Oracle Discoverer database without having to manually write them down? I am using Oracle Database 10g Enterprise Edition.

    Hi,
    To implement the EUL Management BA follow metalink NOTE:556932.1
    there are very simple steps you need to perform in order to use it

  • How can I get a list of all my annotations to send to someone else, listed by PAGE #, not order.

    How can I get a list of all my annotations to send to someone else, listed by PAGE #, not order??

    The comments list is sorted by page by default. If it's not for some reason, click the "Sort comments" button and select that option. It looks like this:

  • How can I get a list of all laptops or users with folder direction enabled or offline files enabled, be it sccm or poerwshell . i have struggled for a week.

    How can I get a list of all laptops or users with folder direction enabled or offline files enabled, be it sccm or poerwshell . i have struggled for a week.

    Hi,
    There is no such PowerShell command can achiev this. Maybe you can use a script to get the user name with folder redirection enabled. However, I am not familiar with writing script, and it would be better for you to ask in script forum below for professional
    assistance:
    http://social.technet.microsoft.com/Forums/en-US/home?forum=ITCG&filter=alltypes&sort=lastpostdesc
    Best Regards,
    Mandy
    Please remember to mark the replies as answers if they help and unmark them if they provide no help. If you have feedback for TechNet Subscriber Support, contact [email protected]

  • How can I get a list of active savepoints for the current session?

    Hi,
    In Oracle Applications, we are getting the following error while performing ROLLBACK to a Savepoint.
    "Unexpected Error: ORA-01086: savepoint 'PTNR_BULK_CALC_TAX_PVT' never establishe d ORA-06510: PL/SQL: unhandled user-defined exception"
    So how can I get a list of active savepoints for the current session?
    Could you please also let me know if there is any better way to debug this issue.
    Appreciate any quick response as the issue is very critical.
    Thanks,
    Soma

    user776523 wrote:
    Hi,
    In Oracle Applications, we are getting the following error while performing ROLLBACK to a Savepoint.
    "Unexpected Error: ORA-01086: savepoint 'PTNR_BULK_CALC_TAX_PVT' never establishe d ORA-06510: PL/SQL: unhandled user-defined exception"It sounds like there's an execution path in the code where the SAVEPOINT is never issued.
    There is no way to get a list of active savepoints. Is this your code or a "canned" procedure? If it is your code you can go through the code looking for answers, possibly tracing execution using DBMS_OUTPUT.PUT_LINE or writing messages to a log table. If its a "canned" procedure you may need to open an SR with Oracle

  • How can i get the list of all users present in the LDAP

    Hi Experts,
    How can i get the list of all users present in the LDAP ?
    Is there any API or function Code to get all user list??
    Please help me out!!!
    Help will be rewarded

    Well it will depend on exactly where your UME configuration points to in the LDAP tree but yes, it is possible to get all users.  Something like the following should do it:
    import com.sap.security.api.*;
    import com.sapportals.portal.prt.component.*;
    IUserFactory iuf;
    ISearchResult isr;
    IUser user
    String userid;
    iuf = UMFactory.getUserFactory();
    isr = iuf.getUniqueIDs();
    you will need to iterate the ISearchResult object but you can get IUser objects by
    userid = (String)isr.next();
    user = iuf.getUser(userid);
    then you can imanipulate / identify / or whatever you need with the user object
    Haydn

  • How can i get the list of all users present in the UME ?

    Hi Experts,
    How can i get the list of all users present in the UME ?
    Is there any API or function Code to get all user list??
    Please help me out!!!
    Help will be rewarded
    -pankaj chouhan

    Hi Pankaj,
    find the official NetWeaver security javadocs (including access to UME) <a href="http://help.sap.com/javadocs/NW04S/current/se/index.html">here</a>. Look for classs UMFactory and proceed from there.
    Best regards,
    Martin

  • How can I get a list of products

    Hi!
    How can I get a list of products via java interface? I know how to get items of product (via    SBOCOMUtil.getProductTrees(company, "PcCw0001")), but which source of code list for second param?

    Should be sth like this (I have no chance to test Java code ):
    IRecordset Src_Rec;
    int i, ii;
    String str2="";
    try
      Src_Rec= SBOCOMUtil.newRecordset(aCompany);
      Src_Rec.doQuery("SELECT Code FROM OITT");
      ii = Src_Rec.getRecordCount().intValue();
      // could be a while-loop as well
      for(i =0; i< ii;i++)
        try
          str2 = Src_Rec.getFields().item(new Integer(0)).getValue().toString();
          Src_Rec.moveNext();
        catch(Exception e)
    catch(Exception e2)
    HTH,
    Frank

  • How can i get a list of latest calls received

    how can i get a list of latest calls received

        Hi Jeff280
    Great question! You can see your usage online at www.verizonwireless.com/myverizon Then view my usage. At the top of the page you can click the blue hyper link to see current usage.
    JoeL_VZW
    Follow us on Twitter @VZWSupoort

Maybe you are looking for

  • Ipad screen broken....internally?

    Ok so here's what happened. I accidentally dropped my ipad yesterday on the ground. When it landed on the ground, the glass on my screen looked just fine, but then i noticed an internal crack. On the side with the internal crack, my sensor will not w

  • Lightroom cc screen blanks while editing

    Just trialling LR CC and I find that using editing tools like the adjustment brush, that the screen blanks after each application of the brush and sometimes the adjustment doesn't happen. I never experienced this with 5.7 My system is OS X 10.10.3 on

  • Separating albums that have the same name by the same artist?

    I have two albums by the group The Small Faces and both are entitled "Small Faces." One came out in 1966 and the next in 1967. They are different albums, just on different labels which may be why they used the same name twice. Anyway, i can't figure

  • LINE ITEM PROBLEM

    hi experts ! There is a Program for displaying domestic sales figures as per    customer/document type/profit centre wise.. input data for report is Company code DOCUMENT TYPE START DATE & END DATE FINANCIAL YEAR. problem is in date when i entered D3

  • Why fn:current-date()/fn:current-time() return incorrect time in OSB 11gR1?

    +system: Oracle Service Bus Version: [Oracle Service Bus Server Side Dependencies 11.1 Fri Mar 19 01:02:35 EDT 2010 ], Oracle Weblogic Server Version: [WebLogic Server 10.3.3.0 Fri Apr 9 00:05:28 PDT 2010 1321401 ] on my local machine (localhost), wi