Jump to content
EduGeek EdSec 2026 is Go! 27th Oct in Derby! Join us for a day of EdTech security focused talks, networking, and an evening social ×

Powershell to count files (inc inside zip)


Recommended Posts

Posted

Hi, We have an issue where our Antivirus scanning is taking too long and I need to count ALL files on a server. I think the problem is the AV is scanning inside of zip files and that the scan is just taking a long time because there are a lot of these files. Problem is we are having complaints because when someone checks the files on the client it doesn't match what our AV is scanning. I want to cound ALL files including inside of ZIP files to see if I can see how many files are really there.

 

I don't need anything fancy just a complete count for files. Ideally it would have a breakdown of folders also - but for the time being I am just trying to prove that the file totals being scanned is accurate. I used:

Get-ChildItem $Server -r | Measure-Object -property Length -sum | select -property Count &

Get-ChildItem $Server -Recurse | Measure-Object | %{$_.Count} as a way of getting file count which is fine. Both count files but neither search inside of zip files. Is this possible via powershell?

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now



×
×
  • Create New...