Scripts Thread, batch file to remove swf games in Coding and Web Development; I have created a batchfile that removes listed swf games,
eg.. del "%Folder%d-missile.swf" /S /F /Q >> %TextFile%
then just ...
22nd June 2012, 10:43 AM #1
batch file to remove swf games
I have created a batchfile that removes listed swf games,
eg.. del "%Folder%\3d-missile.swf" /S /F /Q >> %TextFile%
then just all the games we have found like that, but i have gathered together a mass of games and would like to get a batch file to check against this folder of games and then remove from the students home drives.
22nd June 2012, 11:16 AM #2
I'm not sure what you're asking.
Do you want to check against %TextFile%, add it into %TextFile% if it isn't there and then delete %game%.swf?
Le EDIT: Coffee just kicked in. Check the list, delete if on the list.
Le EDIT MK.2: You're looking at a loop within a loop with a conditional command.
1) List the directory of the user area [Set file = variableA] [FOR /F %%A in (DIR \\server\share\userarea /S /B)]
2) Set content of blacklist as a variable. [Each file = variableB] [FOR /F %%B in (blacklist.txt)]
3) IF variableA is the same as variableB, delete variableA. [IF /I %%A==%%B DEL %%A]
So, you end up with:
It may work... I haven't tested it.
:: Check search User areas
FOR /F %A in ("DIR \\server\share\userdocuments /S /B") DO
:: Check against blacklist
For /F %B in (CheckFile.txt) DO
IF /I %A==%B DEL %A
Last edited by X-13; 22nd June 2012 at 12:11 PM.
By googlemad in forum Windows
Last Post: 16th October 2010, 12:08 AM
By Wheelgunr in forum Windows
Last Post: 12th September 2008, 06:23 PM
By sidewinder in forum Windows
Last Post: 7th December 2007, 05:48 PM
By macca in forum Windows
Last Post: 3rd May 2007, 10:20 AM
By russdev in forum ICT KS3 SATS Tests
Last Post: 16th May 2006, 01:16 PM
Users Browsing this Thread
There are currently 1 users browsing this thread. (0 members and 1 guests)