"Tim Kelley" <tkelley[ at ]company.com> wrote in message news:OlwzAUdsHHA.3364[ at ]TK2MSFTNGP02.phx.gbl...
[Quoted Text] > Is it possible to delete all occurences of a particular file on the local > c: drive when a user logs on? Mayby pipe the dir/s command to a file or > something like that?
How do you determine which files are "this particular file" - is it strictly by name, or do the size, timestamp, and content figure into this to?
do you plan to do this from the logon script? Or do you want this done by policy, or monitoring systems for logon events?
This cannot be done in the general case, unless all of your users are local admins, as otherwise they would lack the privs to delete some files.
Once you get the above details worked out, piping the dir/s command would be one way, but if the computer is XP, try this command:
del /s /f /q C:\particular.file
/Al
|