Ric_ Posted July 8, 2005 Posted July 8, 2005 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): cscript files_v2.vbs /d: /p: /o: /v: The switches do the following: * 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
Mango_RW Posted July 19, 2005 Posted July 19, 2005 Great stuff, another useful addition to the tools folder. Thanks!
Ric_ Posted July 19, 2005 Author Posted July 19, 2005 Remember to post any improvements, it's not perfect!
ICTNUT Posted July 27, 2005 Posted July 27, 2005 @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.
Ric_ Posted July 27, 2005 Author Posted July 27, 2005 @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)
ICTNUT Posted August 3, 2005 Posted August 3, 2005 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.
russdev Posted August 3, 2005 Posted August 3, 2005 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
Ric_ Posted August 3, 2005 Author Posted August 3, 2005 @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.
ICTNUT Posted August 3, 2005 Posted August 3, 2005 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 http://www.supportdeskonline.co.uk/img/ss1.gif Scanning Complete ! http://www.supportdeskonline.co.uk/img/ss2.gif File Extensions http://www.supportdeskonline.co.uk/img/ss3.gif
ninjabeaver Posted August 8, 2005 Posted August 8, 2005 This tool looks like exactly what I need. Any idea when you will release this to the forum? It really looks great.
Dos_Box Posted August 8, 2005 Posted August 8, 2005 Fantastic. I'm sure this will be a real winner and a benefit for all of us.
ICTNUT Posted August 10, 2005 Posted August 10, 2005 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.
ninjabeaver Posted August 10, 2005 Posted August 10, 2005 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.
ICTNUT Posted August 11, 2005 Posted August 11, 2005 @ninjabeaver: Thanks for the typo heads up have fixed that ;-) I have updated some screen shots and is well on course for release tomorrow.
Dos_Box Posted August 11, 2005 Posted August 11, 2005 Would it be OK to host the download here as a mirror too?
tarquel Posted September 1, 2005 Posted September 1, 2005 I'll mirror it also if required Regards Nath
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now