File Count?

Please pardon me if this is answered somewhere; I couldn’t find it in my quick search.

Is there a way to count how many files (preferably without counting folders) are in some part of the Binder?

(Please don’t mention DevonThink or Eagle-Whatever. I’m looking to make do with what I have, at the moment. Thanks!)

If you select a range of files/documents with select-shift,
You’ll see index cards for them and a count of the total at the bottom.
But selecting a series of folders only gives you a count of the folders.

Another trick to quickly cut through a deeply nested Binder tree is to select the highest level element you wish to count (Say if you want to count the Draft, select the Draft element), then turn on the Outliner, select all of the items in the Outliner, and press Cmd-Opt-RightArrow. In the same position that Druid indicates, in the footer, you’ll see a total count.

There will be a better way of getting this information in the next version.

Oh, and automatically excluding folders is going to be difficult. What Druid suggests is probably best, though if you have folders within folders, the contained folders’ index cards will still be counted.

Thank you, druid. :slight_smile: I knew I’d seen a file count somewhere. (EDIT: thanks, too, AmberV. Your reply came as I was replying to druid.)

Is there a way to only count the files in the folders, or no?

(I’m anticipating not, just from how the files/folders work, but I figure it can’t hurt to ask.)

Try clicking around in the Binder with the Outliner open and see how it responds. You should be able to see the relationship between contents and items and get the counts you need. Remember when you expand containers in the Outliner, they get counted too.

How about a terminal solution? assumptions:

  1. File is in your Documents directory. Change to the correct path.
  2. Your file is called “Project.scriv”. Change as appropriate.
find Documents/Project.scriv -name "*.rtfd" | wc -l

On my system this managed to get folder with text as well as the the plain docs.

Ooo! Thanks for those ideas. I’ll try them out when I get home. :slight_smile:

Thanks! :smiley:

scratches head Either I get “no such directory” (yes, I’m adjusting for my directory), or 0. Odd.

Can you post exactly what you are typing?

Once you get that working, you might want to insert an exclusion grep in the middle to get rid of note files. Whenever you write in the note pane for a document, it gets a XX_notes.rtfd side-car file.

find scrivener_project.scriv -name '*.rtfd' | grep -v notes | wc -l

Not making use of note (I know, bad me) I did not know this was needed.

I suspect a space in a dir or file name is the problem with the find…

That’s what I was thinking, too, but I couldn’t get it to work. I don’t know what I was doing the other day, but when I tried it again this morning, it worked fine. So I’m missing 2 review posts in my backup.


That’s what I get for waiting until I had 158 posts before sitting down and backing them all up. (All but 14 announcement posts, anyway.)

Thanks for your help, you two. offers tray Brownie?

EDIT: I used Terminal’s handy “repeat previous entry” feature and see what I did. I kept forgetting the closing quotation mark. headdesk

EDIT 2: I miscounted my announcement posts. I had 16. So I actually have my backup completed. Finally.

Those irritating quotes!

If you need to to this again, AND you have a space in the path to deal with escape the space with . As in

file\ has\ a\ bunch\ of\ spaces

Or you can type the first few characters and hit the tab key. The shell will fill in as much as it can until the name is no longer unique. If hitting tab does nothing then there are 2 possibilities, nothing matches, or more than one thing matches. Hit tab twice and if there are multiple matches they will be listed.

Terminal can be fun.

Ooo! Thanks for that handy tip! I was wondering about that.

I’m realizing that. :smiley: