| Windows 7: Find number of files in a folder? |
04 May 2011
|
#1 | | |
Find number of files in a folder? OK. I have been trying to figure this out for over a week now with no luck. I know I can right-click and select properties to see the number of files and sub-folders in any folder. My problem is that I would like to know the number of files NOT INCLUDING hidden files and folders.
Is there any way to get the count to disregard the hidden and system files without manually counting, as the folder I am really interested in has thousands of files in hundreds of folders and I need to check on a regular basis? | My System Specs |
| OS Windows 7 Ultimate x64 |
04 May 2011
|
#2 | | Win7U 64 RTM Ellesmere Island |
You could uncheck ' Show hidden folders', then check the count by opening the folder and using the hotkey ctrl+A to select all the files in the folder. The number of files should be shown in the status bar (at bottom left). That said, if there are sub folders, ctrl+A will select those and the files in them will be counted as well. You can circumvent that by manually selecting just the files in the given directory (mouse click 1st file, hold down shift, mouse click last file). If you generally show hidden files, you can make quick work of the process by adding show/hide hidden files to the context menu. James | My System Specs | | OS Win7U 64 RTM CPU Q9550 Motherboard GA-EP45-UD3R Memory 8GB Gskill Graphics Card ASUS|EAH4850/HTDI/1GD3/A Sound Card xfi Plat Monitor(s) Displays Dell 2405fpw Screen Resolution 1920x1200 Keyboard MS Natural Ergonomic 4000 Mouse Logitech MX610 USB Cordless PSU Antec Case Antec Hard Drives Seagate & WD sata Drives |
04 May 2011
|
#3 | | |
I understand this. The problem is the folder contains HUNDREDS of sub folders. If I did this I would still have to go into each folder separately to count and then add them all up manually. Do you see where I'm coming from?
I am starting to get the feeling there is no way to do what I want. Sigh..... | My System Specs | | OS Windows 7 Ultimate x64 |
04 May 2011
|
#4 | | Win7U 64 RTM Ellesmere Island |
Quote: I am starting to get the feeling there is no way to do what I want. If Windows 7 can do this, it would likely be via a script or commandline batch file. Maybe someone will chime in. If not, a 3rd party utility might be a possibility.
You could try asking here: The Official Scripting Guys Forum! Forum
James | My System Specs | | OS Win7U 64 RTM CPU Q9550 Motherboard GA-EP45-UD3R Memory 8GB Gskill Graphics Card ASUS|EAH4850/HTDI/1GD3/A Sound Card xfi Plat Monitor(s) Displays Dell 2405fpw Screen Resolution 1920x1200 Keyboard MS Natural Ergonomic 4000 Mouse Logitech MX610 USB Cordless PSU Antec Case Antec Hard Drives Seagate & WD sata Drives |
05 May 2011
|
#5 | | Win 7 Ult + Starter, XP Pro +Home, 2kAS, Linux Mint 8, SuperOS |
Searchmyfiles - freeware, single 50KB executable, does not need to be installed, does not index files Alternative to Windows Search For Files + Duplicates Search
Does this easily - browse to the folder you want, make sure you deselect the subfolder depth, find files, and start search - the number of files is found in the status bar of the searchmyfiles results window
Forgot to mention the attributes switches etc
Karen's directory printer will also do what I think you want over multiple subfolders http://www.karenware.com/powertools/ptdirprn.asp
Last edited by fafhrd; 05 May 2011 at 05:02 AM..
Reason: att.image
| My System Specs | | System Manufacturer/Model Number Acer 7520, Packard Bell dot se, Acer travelmate 2423 OS Win 7 Ult + Starter, XP Pro +Home, 2kAS, Linux Mint 8, SuperOS CPU AMD 64 Athlon X2 , Intel Atom N450, Intel Celeron M 1.50 Ghz Motherboard Acer Fuquene Memory 2.5GB ; 1GB; 2GB Graphics Card Nvidia GeForce7000m; Intel; Intel Sound Card Realtek AC57 Monitor(s) Displays 17" ;10.1"; 19" Screen Resolution 1440x900;1024x600;1440x900; PSU 19v Case Laptop Cooling Air Hard Drives WD 80, WD 320; Internet Speed 9.7Mb/s down 0.99Mb/s up Other Info ISP VIRGINMEDIA 10M cable broadband - D-Link DIR615 wireless router, 3Com OfficeConnect ASDL router used as wireless extender switch |
06 May 2011
|
#6 | | |
Wow. Great app. It seems there is no way to do this in windows 7 itself but thanks to this little app I can now be a file-searching rock star.
Thanks. This is the 3rd NirSoft app that has saved the day. I should just look at thier site first from now on. | My System Specs | | OS Windows 7 Ultimate x64 |
29 Mar 2012
|
#7 | | |
Use Powershell commmand Use the below comand in windows powershell
(Get-ChildItem "C:\My Folder" -force -recurse).Count
This will give you the number of files in "C:\My Folder" including hidden and system file.
-recurse parameter includes files in sub folders. | My System Specs | | |
14 Jul 2012
|
#8 | | |
Right click parent folder, and select properties. The number of files and folders is included it the resulting dialog. | My System Specs | | System Manufacturer/Model Number Alienware OS windows 7 home x32 Graphics Card Nvidia |
14 Jul 2012
|
#9 | | MS Windows 7 Ultimate SP1 64-bit Austin, Texas |

Quote: Originally Posted by premson86 Use the below comand in windows powershell
(Get-ChildItem "C:\My Folder" -force -recurse).Count
This will give you the number of files in "C:\My Folder" including hidden and system file.
-recurse parameter includes files in sub folders. you might want to add the erroraction of silentlycontinue, e.g.,
(dir "C:\Windows" -fo:$true -ea silentlycontinue -rec).Count
try both with and without to see the difference. | My System Specs | | System Manufacturer/Model Number Toshiba Satellite S875D-S7239 laptop OS MS Windows 7 Ultimate SP1 64-bit CPU AMD A10-4600M Motherboard AMD Pumori (Socket FT1) Memory 6.00 GB Dual-Channel DDR3 @ 798MHz (11-11-12-28) Graphics Card AMD Radeon HD 7660G Sound Card High Definition Audio Device Monitor(s) Displays Generic PnP Monitor (1600x900@60Hz) Screen Resolution 1600x900@60Hz Keyboard Standard PS/2 Keyboard Mouse HP Wireless Optical Mobile Mouse Model FHA-3410 Hard Drives SSD 119GB Corsair CSSD-V128GB2 ATA Device Internet Speed What the local pub, local coffee shop offers. Other Info Optical Drive:MATSHITA BD-CMB UJ160B ATA Device
Also have an Asus ha1002xp netbook with Win 7 Ultimate installed. |
14 Jul 2012
|
#10 | | MS Windows 7 Ultimate SP1 64-bit Austin, Texas |
premson,
You also might find this interesting:
(dir $env:systemdrive\boot -fo:$true -ea silentlycontinue -rec | where {($_.PSIscontainer -ne $true) -AND ($_.mode -notmatch "hs")}).count
I changed to \boot to shorten the run time. Would be quicker by using -filter rather than the where clause.
Oh yes, the above excludes folders, hidden files, and system files. | My System Specs | | System Manufacturer/Model Number Toshiba Satellite S875D-S7239 laptop OS MS Windows 7 Ultimate SP1 64-bit CPU AMD A10-4600M Motherboard AMD Pumori (Socket FT1) Memory 6.00 GB Dual-Channel DDR3 @ 798MHz (11-11-12-28) Graphics Card AMD Radeon HD 7660G Sound Card High Definition Audio Device Monitor(s) Displays Generic PnP Monitor (1600x900@60Hz) Screen Resolution 1600x900@60Hz Keyboard Standard PS/2 Keyboard Mouse HP Wireless Optical Mobile Mouse Model FHA-3410 Hard Drives SSD 119GB Corsair CSSD-V128GB2 ATA Device Internet Speed What the local pub, local coffee shop offers. Other Info Optical Drive:MATSHITA BD-CMB UJ160B ATA Device
Also have an Asus ha1002xp netbook with Win 7 Ultimate installed. Find number of files in a folder? problems? All times are GMT -5. The time now is 05:34 AM. | |