Werbung: SecurityConsole.de verwaltet Ihre Computer mit Security Essentails aus der Cloud!
30 Tage kostenfrei testen und 20% Rabatt für Ihre Bestellung mit Promocode: WBF2685582
(Promocode gültig bis 31.12.2011)

Group:  English: Windows Server » microsoft.public.windows.server.scripting
Thread: Delete all occurences of a file

HTVi
TV Discussion Newsgroups

Delete all occurences of a file
"Tim Kelley" <tkelley[ at ]company.com> 6/18/2007 6:17:58 PM
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?

Thanks.


Re: Delete all occurences of a file
"Al Dunbar" <AlanDrub[ at ]hotmail.com.nospaam> 6/19/2007 12:12:16 AM

"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


Home | Search | Terms | Imprint Contact
Newsgroups Reader - provided by WiredBox.Net
Suche nach Orten, Städten, Postleitzahlen, Vorwahlen, Kfz-Kennzeichen