+ Post New Thread
Page 1 of 2 12 LastLast
Results 1 to 15 of 17
Scripts Thread, Nasty hobbit files! in Coding and Web Development; While I'm posting scripts, I thought I would add this one to the collection. I wrote this a while ago ...
  1. #1

    Ric_'s Avatar
    Join Date
    Jun 2005
    Location
    London
    Posts
    7,592
    Thank Post
    109
    Thanked 770 Times in 598 Posts
    Rep Power
    183

    Nasty hobbit files!

    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):
    Code:
    cscript files_v2.vbs /d:<y/n> /p:<path> /o:<path> /v:<y/n>
    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

  2. #2

    Join Date
    Jun 2005
    Location
    Bristol
    Posts
    51
    Thank Post
    0
    Thanked 0 Times in 0 Posts
    Rep Power
    0

    Re: Nasty hobbit files!

    Great stuff, another useful addition to the tools folder. Thanks!

  3. #3

    Ric_'s Avatar
    Join Date
    Jun 2005
    Location
    London
    Posts
    7,592
    Thank Post
    109
    Thanked 770 Times in 598 Posts
    Rep Power
    183

    Re: Nasty hobbit files!

    Remember to post any improvements, it's not perfect!

  4. #4
    ICTNUT's Avatar
    Join Date
    Jul 2005
    Location
    Hereford
    Posts
    1,419
    Thank Post
    196
    Thanked 249 Times in 122 Posts
    Rep Power
    62

    Re: Nasty hobbit files!

    @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.

  5. #5

    Ric_'s Avatar
    Join Date
    Jun 2005
    Location
    London
    Posts
    7,592
    Thank Post
    109
    Thanked 770 Times in 598 Posts
    Rep Power
    183

    Re: Nasty hobbit files!

    @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)

  6. #6
    ICTNUT's Avatar
    Join Date
    Jul 2005
    Location
    Hereford
    Posts
    1,419
    Thank Post
    196
    Thanked 249 Times in 122 Posts
    Rep Power
    62

    Re: Nasty hobbit files!

    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.

  7. #7

    russdev's Avatar
    Join Date
    Jun 2005
    Location
    Leicestershire
    Posts
    6,946
    Thank Post
    709
    Thanked 553 Times in 368 Posts
    Blog Entries
    3
    Rep Power
    204

    Re: Nasty hobbit files!

    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

  8. #8

    Ric_'s Avatar
    Join Date
    Jun 2005
    Location
    London
    Posts
    7,592
    Thank Post
    109
    Thanked 770 Times in 598 Posts
    Rep Power
    183

    Re: Nasty hobbit files!

    @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.

  9. #9
    ICTNUT's Avatar
    Join Date
    Jul 2005
    Location
    Hereford
    Posts
    1,419
    Thank Post
    196
    Thanked 249 Times in 122 Posts
    Rep Power
    62

    Re: Nasty hobbit files!

    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


  10. #10
    ninjabeaver's Avatar
    Join Date
    Jun 2005
    Location
    Norfolk
    Posts
    1,090
    Thank Post
    183
    Thanked 100 Times in 88 Posts
    Rep Power
    46

    Re: Nasty hobbit files!

    This tool looks like exactly what I need. Any idea when you will release this to the forum? It really looks great.

  11. #11

    Dos_Box's Avatar
    Join Date
    Jun 2005
    Location
    Preston, Lancashire
    Posts
    9,216
    Thank Post
    657
    Thanked 2,249 Times in 1,031 Posts
    Blog Entries
    23
    Rep Power
    669

    Re: Nasty hobbit files!

    Fantastic. I'm sure this will be a real winner and a benefit for all of us.

  12. #12
    ICTNUT's Avatar
    Join Date
    Jul 2005
    Location
    Hereford
    Posts
    1,419
    Thank Post
    196
    Thanked 249 Times in 122 Posts
    Rep Power
    62

    Re: Nasty hobbit files!

    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.

  13. #13
    ninjabeaver's Avatar
    Join Date
    Jun 2005
    Location
    Norfolk
    Posts
    1,090
    Thank Post
    183
    Thanked 100 Times in 88 Posts
    Rep Power
    46

    Re: Nasty hobbit files!

    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.

  14. #14
    ICTNUT's Avatar
    Join Date
    Jul 2005
    Location
    Hereford
    Posts
    1,419
    Thank Post
    196
    Thanked 249 Times in 122 Posts
    Rep Power
    62

    Re: Nasty hobbit files!

    @ninjabeaver: Thanks for the typo heads up have fixed that ;-)

    I have updated some screen shots and is well on course for release tomorrow.

  15. #15

    Dos_Box's Avatar
    Join Date
    Jun 2005
    Location
    Preston, Lancashire
    Posts
    9,216
    Thank Post
    657
    Thanked 2,249 Times in 1,031 Posts
    Blog Entries
    23
    Rep Power
    669

    Re: Nasty hobbit files!

    Would it be OK to host the download here as a mirror too?

SHARE:
+ Post New Thread
Page 1 of 2 12 LastLast

Similar Threads

  1. Replies: 38
    Last Post: 26th November 2010, 03:42 PM
  2. .nrg files HELP!
    By thegrassisgreener in forum Windows
    Replies: 5
    Last Post: 6th September 2007, 06:57 PM
  3. Nasty wifi hobbits!
    By Ric_ in forum General Chat
    Replies: 10
    Last Post: 24th April 2007, 06:56 PM
  4. Nasty File Search not Working/Crashes
    By Grommit in forum Windows
    Replies: 4
    Last Post: 15th March 2007, 04:53 PM
  5. Administrators Nasty File Search errors.
    By Kyle in forum How do you do....it?
    Replies: 5
    Last Post: 24th January 2006, 09:53 PM

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •