RSS Feeds | Advanced File Delete Script |
|
|
|
| Written by Cheyenne Harden | ||||||
|
I saw a Power Shell script recently and it showed how to delete all files recursively for a HD. So, go ahead and run this on you Domain Controller!!! Just Kidding!!! ----------COPY EVERYTHING BELOW THIS LINE---------- 'Script to delete files via name and/or file extension On Error Resume Next If strFileName > "" Then ElseIf strFileExtension > "" Then End If
Set objWMIService = GetObject("winmgmts:\\" & strComputer & "\root\cimv2") For Each objFile in colFiles Wscript.Echo "Files Deleted" Sub DeleteFileExt() Set objWMIService = GetObject("winmgmts:\\" & strComputer & "\root\cimv2") For Each objFile in colFiles Sub DeleteFileName() Set objWMIService = GetObject("winmgmts:\\" & strComputer & "\root\cimv2") For Each objFile in colFiles
PLEASE MAKE SURE NO WORD WRAPPING IS HAPPENING IN YOUR SCRIPT!!! To make this script work you will need one things!
This information is provided "AS IS" with no warranties expressed or implied.
Powered by !JoomlaComment 3.26
3.26 Copyright (C) 2008 Compojoom.com / Copyright (C) 2007 Alain Georgette / Copyright (C) 2006 Frantisek Hliva. All rights reserved." |
||||||
| < Prev | Next > |
|---|
















