I believe this should be a very simple task for anyone good at batch scripting.

Basically I need a batch script that will run through a directory and produce a text file for me.

Directory: D:\SQLBackup

If any folder in this directory has more than 145 records I need to know because that means someone forgot to add the database name to the cleanup script.

I would like a script that will count all the files in every folder in my directory "D:\SQLBackup" and if one of the folder has more than 145 records it produces a text file with the following format: Databasename_NumberOfFiles.

If anyone can write this .bat I would be very grateful

Thank you!

I've checked that site out it wasn't too helpful

Thanks though

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.