Skip navigation
Currently Being Moderated

count files in a folder

Aug 16, 2012 11:32 AM

I want to count the files in a volume. This will tell me how many pictures that i have then as certain actions happen it will automatically add them up for me. First step is finding the corect syntax for the items.

 
Replies
  • Currently Being Moderated
    Aug 16, 2012 12:26 PM   in reply to Gonterman1201
    alert(app.document.thumbnail.children.length);
    
     
    |
    Mark as:
  • Currently Being Moderated
    Aug 16, 2012 1:16 PM   in reply to Gonterman1201

    alert( app.document.visibleThumbnailsLength );

     
    |
    Mark as:
  • Currently Being Moderated
    Aug 16, 2012 2:01 PM   in reply to Gonterman1201

    The problem with the above methods is that they could be counting folders/text/exe files etc.

    You can control what you want to count with something like this...

     

     

    app.document.deselectAll();
    alert(app.document.getSelection("jpg,pdf,tif").length);
    
    

     

    The above will only count jpg, pdf and tif files.

     
    |
    Mark as:
  • Currently Being Moderated
    Aug 17, 2012 4:13 AM   in reply to Gonterman1201

    What was your intent with this script Bridge already has a built-in file type counter? My desktop is very tidy just now…!!!!

     

    Screen shot 2012-08-17 at 12.12.01.png

     
    |
    Mark as:

More Like This

  • Retrieving data ...

Bookmarked By (0)

Answers + Points = Status

  • 10 points awarded for Correct Answers
  • 5 points awarded for Helpful Answers
  • 10,000+ points
  • 1,001-10,000 points
  • 501-1,000 points
  • 5-500 points