How many files are there in a folder with subfolders ?
¿How do I count the files in a folder with subfolders?
¿How do I count the files in a folder with subfolders?
If you want to count only the files(not counting the subfolders themselves towards the total number), open the AppleScript Editor in the /Applications/Utilities/ folder and run the following as posted:
tell application "Finder"
count files of entire contents of (choose folder)
end tell
(111108)
Niel's solution is correct if all you want is strictly the number of files rather than the total number of items. It's hardly complicated. Just open Applescript Editor and paste his code into it. Save it.
Yes, that's correct. 679 visible files, the difference being hidden files and/or folders included in the count for a total of 1116.
TextWrangler is a more advanced, third party text editor. There's a free and paid version. All I used it for in my test was to copy/paste all of the non hidden file names EasyFind listed to confirm 401 lines of listed items.
Niel's advice is hardly complicated, but try this one.
1. Download the free EasyFind.
2. Open the app and set the options as shown here:
3. At the right of the interface, choose which drive you want to count all files of.
4. In the search field, enter a single asterisk * and press Enter.
It will list only visible files in all folders and subfolders. I did this to a drive that didn't have a whole lot on it. This count at the top of the list of items was:
I copy/pasted the output into TextWrangler to see how many lines there were. 401 was the correct number of visible files. The value 441 was the total number of files on the drive including hidden items and folders.
If you have folder A containing 1 file an 1 empty folder B, and rightclick Get Info , how many items will it shoe ?
It will show 3 items.
So it is not what I want.
It is the number of files , not counting subfolders that I want to know
Niel is giving a complicated solution
Is there no simple solution ?
Running the AppleScript isn't any more complicated than opening TextEdit, pasting text in, and saving the document; the script text above is meant to be run as is and doesn't require any editing.
(111114)
The instructions I gave above counts all files on an entire drive. If you want to limit the count to a particular folder and its subfolders, click on the same menu for selecting a drive and select the first option; conveniently named "Select". A Finder window will open. Navigate to the folder you want and click Select. Using the same settings at the left side of the interface, press Enter again to get a new list. You will get a count of items only in that folder and its subfolders.
OK, but now I would like to move all those files in the list to another folder.
Is this possible ?
My solution would be to move them all to Trash (which I first empty) and from here move the files to another folder !
Use the following AppleScript:
tell application "Finder"
move every file of entire contents of (choose folder) to folder "Macintosh HD:Users:username:Documents"
end tell
changing the path as needed. Use colons to separate the folders in it.
(111136)
The EasyFind window is live. Click anywhere in the list and press Command+A to select all. Drag and drop the contents out of the EasyFind interface into the folder where you want them. When you press Enter in EasyFind again so it can update itself, it will list all of the same files in their new location.
Does of course depend on where the files currently are and where they're going. On the same drive/partition, they'll move to the new folder. Different drive/partition, they'll copy. Haven't tested to see if you can hold down the Command key while dragging out of EasyFind to force a move rather than copy.
There is no need to put the files you're relocating in the trash first. Move them directly to the destination folder.
SideEffects - I see no effect at all. Where is the documentation?
XtraFinder - documentation ? lots of settings there which I cant figure out
It can create colors in the sidebar but I have no control on it
U R right .... but it is because the new Forum interface is a lot more complicated than the previous
The timeout is now just a few minutes (it used to be much longer) , and then I have to click a lot more than before to find my topic
No wonder such situations as this can arrise
How many files are there in a folder with subfolders ?