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.
I ended up using this but I am sure its the same thing.
var myItems =app.document.thumbnail.children;
for (var i=0; i<myItems.length; i++){}
alert(i-2);
I am slowly plucking away at this calculator thing.
I am subtracting two because I have two pdf files I don't want to count.
Yep just tried it. It works.
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.
The intent is to inventory the images for each folder I view and inhance. There are multiple jpgs in the folder along with two pdfs a high and low res. The low res is droped to a hot folder after the low res pdf is droped the script would count the jpgs. Then when I move on to the next folder and do the same thing it adds it to my exsisting tally. Each time subtracting the two pdf files from the tally. Or if you can identify the jpgs you would not have to subtract.
North America
Europe, Middle East and Africa
Asia Pacific