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.
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.Code::: 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 :: DELETE! IF /I %A==%B DEL %A
Last edited by X-13; 22nd June 2012 at 11:11 AM.
There are currently 1 users browsing this thread. (0 members and 1 guests)