+ Post New Thread
Results 1 to 10 of 10
Scripts Thread, Script to delete certain files in Coding and Web Development; hi there, we are having a bit a of a issuse with the pupils and use of flash games i've ...
  1. #1
    tri_94's Avatar
    Join Date
    Feb 2007
    Location
    Lincolnshire
    Posts
    117
    Thank Post
    2
    Thanked 2 Times in 2 Posts
    Rep Power
    18

    Script to delete certain files

    hi there, we are having a bit a of a issuse with the pupils and use of flash games

    i've keep searching and deleting them off shared and there work areas.

    im just wondering if anyone can give me a script that will search all a drive and subfolders for the following files.

    air hockey.swf
    airhockey.swf
    bot arena.swf
    bowmaster.swf
    canyonglider.swf
    evilcar.swf
    gunmaster.swf
    gravity.swf
    linderider beta 2.swf
    linerider.swf
    mario.swf
    miniput.swf
    monster-truck-trials.swf
    monstertrucks.swf
    skywire.swf
    stick1.swf
    stuntdirtbike.swf

    and delete them without having to scroll through as we use swf files for out ict pupils webdesign.


    thanks
    nick

  2. #2

    timbo343's Avatar
    Join Date
    Dec 2005
    Location
    Leeds/York area, North Yorkshire
    Posts
    3,198
    Thank Post
    321
    Thanked 314 Times in 219 Posts
    Rep Power
    125
    Just enable file management in server 2003 R2 if you are running R2, that will stop users from saving .swf to their home drives.
    I just run a search and delete them that way.

  3. #3
    Jona's Avatar
    Join Date
    May 2007
    Location
    Cranleigh
    Posts
    471
    Thank Post
    14
    Thanked 51 Times in 49 Posts
    Rep Power
    24
    That shouldn't be too hard to script, but what stops the students just renaming the files, once they realise what is happening?

    Jona

  4. #4
    PEO
    PEO is offline
    PEO's Avatar
    Join Date
    Oct 2007
    Posts
    2,096
    Thank Post
    457
    Thanked 152 Times in 96 Posts
    Rep Power
    72
    Quote Originally Posted by timbo343 View Post
    Just enable file management in server 2003 R2 if you are running R2, that will stop users from saving .swf to their home drives.
    I just run a search and delete them that way.
    cool plan... but if they use fireworks to create flash work for ocr etc then this would cause a few problems. think he may need to wright a script to delete particular files that he has listed.

    I would be intrested in this, as the kids seem to be able to download daft games like jetman etc

  5. #5
    tri_94's Avatar
    Join Date
    Feb 2007
    Location
    Lincolnshire
    Posts
    117
    Thank Post
    2
    Thanked 2 Times in 2 Posts
    Rep Power
    18
    nothing to stop that, however our pupils havent realised that.

    so anychance anyone can give me script

  6. #6
    antoeknee's Avatar
    Join Date
    Oct 2007
    Location
    NW
    Posts
    210
    Thank Post
    0
    Thanked 6 Times in 6 Posts
    Rep Power
    16
    If you're using Lan Ranger you could use the directory monitor

  7. #7
    ChrisH's Avatar
    Join Date
    Jun 2005
    Location
    East Lancs
    Posts
    5,007
    Thank Post
    124
    Thanked 286 Times in 263 Posts
    Rep Power
    109
    Use a software restriction policy and make a hash of the files. This will mean that no matter what they rename them they will not be able to run them.

  8. #8
    tri_94's Avatar
    Join Date
    Feb 2007
    Location
    Lincolnshire
    Posts
    117
    Thank Post
    2
    Thanked 2 Times in 2 Posts
    Rep Power
    18
    can anyone give me a script that i can run on shared area to check all folders for the certain files and delete them if they are there. as i've looked on the net and cant find a way to do it.

    thanks
    nick

  9. #9
    tomscaper's Avatar
    Join Date
    Jul 2006
    Posts
    814
    Thank Post
    118
    Thanked 29 Times in 15 Posts
    Rep Power
    23
    Personally i wouldnt bother wasting your time deleting the games, as they will soon learn to rename them. I delete games each term and i leave it up to the teachers to make sure they dont play on them, used to spend all my time trying to figure out how to stop this but sometimes the solution is to leave this in the teachers hands.

  10. #10
    Kyle's Avatar
    Join Date
    Jan 2006
    Posts
    984
    Thank Post
    92
    Thanked 14 Times in 13 Posts
    Rep Power
    22
    Not sure if you could adapt this. I used it to delete two files but it may take a while for you to set up but once its done it would be easy to add to it.

    Call DeleteIfFound ("C:\Documents and Settings\All Users\Desktop\Class Server - Teacher.lnk")

    Function DeleteIfFound (FilePath)
    Dim Fso
    Set Fso = CreateObject ("Scripting.FileSystemObject")
    If Fso.FileExists (FilePath) Then
    Fso.DeleteFile (FilePath)
    End If
    Set Fso = Nothing
    End Function

    Call DeleteIfFound ("C:\Documents and Settings\All Users\Start Menu\Programs\Class Server - Teacher.lnk")

    Function DeleteIfFound (FilePath)
    Dim Fso
    Set Fso = CreateObject ("Scripting.FileSystemObject")
    If Fso.FileExists (FilePath) Then
    Fso.DeleteFile (FilePath)
    End If
    Set Fso = Nothing
    End Function

    Just change the files paths to use a wildcard to search multiple folders.



SHARE:
+ Post New Thread

Similar Threads

  1. Replies: 5
    Last Post: 1st July 2014, 09:34 AM
  2. Script to delete *.tmp
    By markesmith in forum Scripts
    Replies: 4
    Last Post: 30th April 2008, 12:57 PM
  3. Replies: 5
    Last Post: 9th March 2008, 01:15 AM
  4. Replies: 3
    Last Post: 25th September 2006, 01:27 PM
  5. Script to delete printer
    By tosca925 in forum Scripts
    Replies: 2
    Last Post: 31st August 2005, 08:45 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
  •