delete contents from folder upon login

  • Thread starter Thread starter jatman
  • Start date Start date
J

jatman

good afternoon,

is it possible to write a small batch file that will delete the contents of
a folder when a user logs onto xp.

normally i would write a macro in word to do this, but i am experiencing
difficulties and have opted to just delete the contents of the folder when a
user logs on.

the files would be temporary files that need to be saved properly (for file
name and subject lines) before they can be emailed out by Outlook. users
always forget to clean up the folder so sometimes there could be sensitive
information in the folder.

any suggestions on where to start would be appreaciated,

jat
 
XP has GPEDIT.MSC, which can set a policy to use a "Logon Script" of your
own creation. Knowing the path to the files, there a numerous ways to delete
them.
--delete.bat--
del <PathToFiles>\*.* /q
--end file--
 
thanks Mark, that was a great start. i set up the batch file to run on logoff.

or the script paramaters, i have
%systemroot%\grouppolicy\users\scripts\logoff
is this correct?

i tried to use the del command in just straight dos and also checked out the
site http://www.computerhope.com/delhlp.htm and tired their commands, but it
does not work.

are the scrip paramaters correct, or are they for something else. (i also
tried it with the scrip paramaters blank.) are there any other sites that i
could check out that you know of?

thanks,

jat
 
Back
Top