
While I'm posting scripts, I thought I would add this one to the collection. I wrote this a while ago to remove the clutter from users' homeshares.
The syntax is as follows (from a command prompt):
The switches do the following:Code:cscript files_v2.vbs /d:<y/n> /p:<path> /o:<path> /v:<y/n>
* d - delete 'bad files'
* p - path to check (checks recursively)
* o - path to output file (listing 'bad files' found)
* v - run verbosely
You will need to edit the array to configure the files that you believe to be nasty. If you delete any of the items or add to the array, make sure that you adjust the array's size accordingly.
You can also run this at logon over a user's homeshare to delete the nasties![]()
Great stuff, another useful addition to the tools folder. Thanks!

Remember to post any improvements, it's not perfect!![]()
@Ric_: If you run the script over say 70,000 files and folders as we have it will scan the lot in about 70 secs.
Which in all fairness is not bad, however there is a small issue where if you use the delete flag if you hit a read only file the script falls over.
I am working on adding some updates to the script and will post an update in due course.

@ICTNUT: I know that there is a problem where if the ownership and permisions meet certain criteria it will fall over but it does make you wonder why people are trying to hide things from you
I thought that I'd stuck an 'On Error Resume Next' as a temporary fix but maybe not.
70 secs is pretty good for a single threaded script though (even if I do say so myself)![]()
Hi All,
I have been using the script put together by Ric_ above and it's very good, but I need more.
I have put together a small executable (around 140k in size) that will do the following:
1) Scan all files and folders looking for specififed extensions
2) User can control how deep to scan (how many levels deep)
3) User can control if a recursive scan is performed
4) User can specify what extensions to scan for
5) User can specify if files are to be delete or just reported
6) User can specify if the folder is to be deleted or just reported
7) User can schedule the application to run, silently if required
8) User can have the files found report emailed automatically to an email of thier choice
There are many other features included in this application, the beauty of it is that you only need to set the settings once as they are stored, then its just a case of schedule the app to run.
The email report can either be a breif look what I found report or a full in depth one.
I have decided not to use the FSO object like Ric_ but use the Windows API and multi thread the application, currently in testing I have been able to scan 500,000 files and folders in little over 60 seconds with only a 3% CPU overhead (Tested on dual xeon 4Ghz Processors with 2Gb Ram)
I am doing some final testing and will release it, If you would like a copy PM me, and if we get enough response we can start doing some enhancements.

hi spoke to ozan about this and seemed like it would be a good thing to add the group project at moment code is in vb 6 but after he has got this version working ozan said converting to .net would be a good idea...
So what do people think should this be part of the group project will leave it to the members to decide...
Russ

@Russ: It may be an idea to turn the project into an 'administrators workbench' type tool. A nice GUI with those bubly-style people icons that MS now uses.
The different components could then be modularised and inserted in some way.
I am in the final stages of gettinig the first release finished, just some tweeks but below is a screen shot for you all.
Main Nerve Center
Scanning Complete !
File Extensions
![]()
This tool looks like exactly what I need. Any idea when you will release this to the forum? It really looks great.

Fantastic. I'm sure this will be a real winner and a benefit for all of us.
Hi all,
I have set the release date as this friday 12th August 2005.
I did want it out on Monday but have added support for over 50 extensions giving great scope and have also streamlined the email facility too.
Last set of tests show the whole process of scanning 500,000 files and generating the log and emailing it to an admin take less that 70 seconds.
In the meantime I have setup a website --> Here <-- if you want to take a look.
I will submit a download request on Friday so the app can be added.
You've got a small typo on the bottom paragraph. It says sacnning instead of scanning. Looks awesome though. Thanks for putting the time and effort in.
@ninjabeaver: Thanks for the typo heads up have fixed that ;-)
I have updated some screen shots and is well on course for release tomorrow.

Would it be OK to host the download here as a mirror too?
There are currently 1 users browsing this thread. (0 members and 1 guests)