Find number of files in a folder?

dkplayaclub

New member
Local time
6:13 AM
Messages
24
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 Computer My Computer

At a glance

Windows 7 Ultimate x64
OS
Windows 7 Ultimate x64
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 Computer My Computer

At a glance

Win7U 64 RTMQ95508GB GskillASUS|EAH4850/HTDI/1GD3/A
OS
Win7U 64 RTM
CPU
Q9550
Motherboard
GA-EP45-UD3R
Memory
8GB Gskill
Graphics Card(s)
ASUS|EAH4850/HTDI/1GD3/A
Sound Card
xfi Plat
Monitor(s) Displays
Dell 2405fpw
Screen Resolution
1920x1200
Hard Drives
Seagate & WD sata Drives
PSU
Antec
Case
Antec
Keyboard
MS Natural Ergonomic 4000
Mouse
Logitech MX610 USB Cordless
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 Computer My Computer

At a glance

Windows 7 Ultimate x64
OS
Windows 7 Ultimate x64
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 Computer My Computer

At a glance

Win7U 64 RTMQ95508GB GskillASUS|EAH4850/HTDI/1GD3/A
OS
Win7U 64 RTM
CPU
Q9550
Motherboard
GA-EP45-UD3R
Memory
8GB Gskill
Graphics Card(s)
ASUS|EAH4850/HTDI/1GD3/A
Sound Card
xfi Plat
Monitor(s) Displays
Dell 2405fpw
Screen Resolution
1920x1200
Hard Drives
Seagate & WD sata Drives
PSU
Antec
Case
Antec
Keyboard
MS Natural Ergonomic 4000
Mouse
Logitech MX610 USB Cordless
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
smf.PNG

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:

My Computer My Computer

At a glance

Win 7 Ult + Starter, XP Pro +Home, 2kAS, Linu...AMD 64 Athlon X2 , Intel Atom N450, Intel Cel...2.5GB ; 1GB; 2GBNvidia GeForce7000m; Intel; Intel
Computer 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(s)
Nvidia GeForce7000m; Intel; Intel
Sound Card
Realtek AC57
Monitor(s) Displays
17" ;10.1"; 19"
Screen Resolution
1440x900;1024x600;1440x900;
Hard Drives
WD 80, WD 320;
PSU
19v
Case
Laptop
Cooling
Air
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
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 Computer My Computer

At a glance

Windows 7 Ultimate x64
OS
Windows 7 Ultimate x64
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 Computer My Computer

At a glance

Windows 7
OS
Windows 7
Right click parent folder, and select properties. The number of files and folders is included it the resulting dialog.
 

My Computer My Computer

At a glance

windows 7 home x32Nvidia
Computer Manufacturer/Model Number
Alienware
OS
windows 7 home x32
Graphics Card(s)
Nvidia
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 Computer My Computer

At a glance

MS Windows 7 Ultimate SP1 64-bitAMD A10-4600M6.00 GB Dual-Channel DDR3 @ 798MHz (11-11-12-28)AMD Radeon HD 7660G
Computer 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(s)
AMD Radeon HD 7660G
Sound Card
High Definition Audio Device
Monitor(s) Displays
Generic PnP Monitor (1600x900@60Hz)
Screen Resolution
1600x900@60Hz
Hard Drives
SSD 119GB Corsair CSSD-V128GB2 ATA Device
Keyboard
Standard PS/2 Keyboard
Mouse
HP Wireless Optical Mobile Mouse Model FHA-3410
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.
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 Computer My Computer

At a glance

MS Windows 7 Ultimate SP1 64-bitAMD A10-4600M6.00 GB Dual-Channel DDR3 @ 798MHz (11-11-12-28)AMD Radeon HD 7660G
Computer 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(s)
AMD Radeon HD 7660G
Sound Card
High Definition Audio Device
Monitor(s) Displays
Generic PnP Monitor (1600x900@60Hz)
Screen Resolution
1600x900@60Hz
Hard Drives
SSD 119GB Corsair CSSD-V128GB2 ATA Device
Keyboard
Standard PS/2 Keyboard
Mouse
HP Wireless Optical Mobile Mouse Model FHA-3410
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.
The search in Free Commander has some useful 'untick' options.
And choose to include subfolders or not.
 

Attachments

  • com.JPG
    com.JPG
    92.8 KB · Views: 17

My Computer My Computer

At a glance

W7, W8.1
Computer type
Laptop
Computer Manufacturer/Model Number
Dell \ Lenovo\ HP \ Toshiba
OS
W7, W8.1
Antivirus
MSE, Malwarebytes
Browser
FF
This may work

This may work - but doesn't seem to do the entire operating system drive very well.
In Windows Explorer select the drive or folder where you want to check the number of files and enter "*" (no quotes) in the search box. It will tell you instantly if the folder/drive is indexed, in a minute or two if not.

This will show you the number of visible files/folders. If you want to include hidden files/folders, unhide them in Explorer, Tools, Folder options, View. Worth a try anyway.
 

My Computer My Computer

At a glance

Windows 7 professional
OS
Windows 7 professional
This may work

This may work - but doesn't seem to do the entire operating system drive very well.
In Windows Explorer select the drive or folder where you want to check the number of files and enter "*" (no quotes) in the search box. It will tell you instantly if the folder/drive is indexed, in a minute or two if not.

This will show you the number of visible files/folders. If you want to include hidden files/folders, unhide them in Explorer, Tools, Folder options, View. Worth a try anyway.

Or click right on a folder in Explorer (not on a partition)

FreeCommander can give some file information as indicated by previous poster.
 

My Computer My Computer

At a glance

Windows 7 professional
OS
Windows 7 professional
More on NirSoft Apps

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.

If you like those little Nirsoft apps, take a look at this. Control Sysinternals Suite & NirSoft Utilities with a Single Interface

This little ditty will organize and update all Nirsoft and Sysinternal standalone goodies! Just follow the instructions in this How-to-Geek post. Really very simple. I use a lot of them. Caution: most AV progs will bark about some of the Nirsoft apps cause they get into sensitive internals. They most likely will show up if you scan for PUPs. If some AV wacks one, you can always get it back with the "update" function. Mke sure to select 64bit if available if you're running x64.


Give a look, and enjoy! :D
 

My Computer My Computer

At a glance

Windows 7 Ultimate x64dual core @3.20ghz4GB
Computer type
PC/Desktop
Computer Manufacturer/Model Number
Dell Inspiron 560
OS
Windows 7 Ultimate x64
CPU
dual core @3.20ghz
Memory
4GB
Sound Card
Realtek hd & intel hdmi
Monitor(s) Displays
Dell 21.5"
Screen Resolution
1920x1080 (running 1600x900)
Hard Drives
internal 500GB
ext buffalo hd-pntu3 1TB
Keyboard
Dell wireless
Mouse
Dell wireless
Internet Speed
50/25
Antivirus
MSE & SAS
Browser
Chrome
Other Info
Canon Pixma MX410 Printer
Altec Speakers l-center boom-r
Back
Top