1.

Solve : Files in a Folder?

Answer»

Hi All,

I would like to run a script that will count the number of files in a folder (local or shared of a server) and send me an alert if it CONTAINS more than the specified number of files.

I have found on this Forum the following:

dir "D:\Test" /b | find /v /C "::" - shows me the number of files in the test folder
dir "\\sh-backt-rl01\TEST" /b | find /v /c "::"- shows me the files on that share

Any help will be MUCH appreciated.
THANKS in advance. I would think you would want it to traverse any sub-directories in there and an exclude it from counting the directories. That is not that difficult. That CHALLENGE is how you want to be notified.
Just curious as to the application for this?

Is it to ...
- Detect files saved to wrong locations by users.
- Find malware files that have been dropped there.
- trying to think of any other application for this...



Discussion

No Comment Found