Discussion Locked

remove data on exit

0 helpful
1 reply
Closed to new repliesThis discussion is closed. It stays readable, but it takes no new replies.

i need advise on deleting data on a directory C:\ immediately after it has been viewed, in addition the cache needs to be periodically and freequently purged.

can anyone assist approx 6000 pc's

can this be done via group policy if so i need an example please

thanks guys/gals

1 reply

by rpreuss

It would be simple enough to create a log on or log off script to delete the files in question. And it could easily be enforced using Group Policy. The only thing is it wouldn't be deleted immediately after being viewed, it would be deleted on logout, or log on or start up or shutdown of the PC.

Here is some code as an example:

<%
dim filesys, demofile
set filesys = CreateObject("Scripting.FileSystemObject")
set demofile = filesys.GetFile("c:\somefile.txt")
demofile.Delete
%>

You can put this into a text file, save it with a .vbs extension then add it to group policy in the log off (UserConfiguration, Windows Settings, Scripts), or shutdown (computer Configuration, Windows Settings, Scripts) scripts section.

This discussion is closed to new replies.