+ Post New Thread
Results 1 to 3 of 3
Scripts Thread, A directory list of SWF and MP3 - but EXCLUDING "ICT Work" and "ICT Music" Folders? in Coding and Web Development; We are looking to cut down on the amount of MP3 and SWF in students areas. Off the top of ...
  1. #1

    Join Date
    Aug 2007
    Posts
    818
    Thank Post
    99
    Thanked 65 Times in 47 Posts
    Rep Power
    26

    A directory list of SWF and MP3 - but EXCLUDING "ICT Work" and "ICT Music" Folders?

    We are looking to cut down on the amount of MP3 and SWF in students areas.

    Off the top of anyones heads, do you think it would be easy to run a script that would list all the SWF and MP3 in our students drives, but not list anything that is in thier "ICT Work" or "Music Work" folders.

    and also Visa Versa ?

    So once i have deleted all the files from thier home drives, the teacher can then have a regular log of all the SWF located in the ICT Work folders?

    Thanks in advance

  2. #2

    Join Date
    Feb 2006
    Location
    Derbyshire
    Posts
    1,381
    Thank Post
    181
    Thanked 211 Times in 171 Posts
    Rep Power
    65
    From the top level directory where the home directories are stored - old school CMD prompt action...

    dir *.mp3 *.swf /s /b | find /i /v "\ICT Work" | find /i /v "\Music Work" > badlist.txt

    Edit - just noticed the vice versa - for this one you'd have to use three lines...

    dir *.mp3 *.swf /s /b | find /i "\ICT Work" | > goodlist1.txt
    dir *.mp3 *.swf /s /b | find /i "\Music Work" | > goodlist2.txt
    type goodlist1.txt >> goodlist2.txt

    Goodlist2 would end up being a joined list of everything found in ICT Work + Music Work.
    Last edited by OutToLunch; 3rd July 2009 at 03:35 PM.

  3. Thanks to OutToLunch from:

    burgemaster (6th July 2009)

  4. #3

    Join Date
    Jan 2009
    Posts
    12
    Thank Post
    2
    Thanked 0 Times in 0 Posts
    Rep Power
    0

    Powershell alternative

    Hi Guys,

    Just thought I'd throw this in as an alternative. It's a powershell script that will find all files for a specified file type (swf at the present) but ignore them if it's a particular file name. It will then move them to an alternate location but recreate the file structure so should you catch anything that is legitimate then it can easily be moved back.

    We've set up a share that only the staff can access where these files get moved to so that they don't have to find one of us techies should they need it moving back.

    Hope it helps. Here's the link.

    PS - Find Files & Move Maintaining Hierarchy

    *Requires Powershell V2

SHARE:
+ Post New Thread

Similar Threads

  1. Anyone had experience with "Turn IT On!" ICT support?
    By AngryTechnician in forum Recommended Suppliers
    Replies: 0
    Last Post: 25th April 2009, 08:30 PM
  2. Replies: 1
    Last Post: 31st August 2008, 03:07 PM
  3. "Error 403" & "Moved to here" message
    By tech_guy in forum Windows
    Replies: 4
    Last Post: 24th January 2008, 01:07 PM
  4. Replies: 2
    Last Post: 18th December 2007, 09:25 AM
  5. Replies: 6
    Last Post: 28th September 2006, 07:06 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
  •