Torgeir
Wed Jul 20 08:14:10 CDT 2005
Wizard wrote:
> Hi Group,
>
> Hope your all well?
> I wonder if somebody could give me some help on this one, or maybe some
> Examples?
>
> I have a Directory call C:\HFSWIN\ In here I have around 90 files, with
> vereous file formats. I would like to be able to delete all files files that
> end with *.lbl, *.lbv, & *.lbb. Except these 9 files:
>
> Jordans1.lbl
> Jordans2.lbl
> Jordans3.lbl
> Jordans1.lbv
> Jordans2.lbv
> Jordans3.lbv
> Jordans1.lbb
> Jordans2.lbb
> Jordans3.lbb
>
> Is this possible?
Hi,
With a batch file (.bat or .cmd):
--------------------8<----------------------
@echo off
cd /d C:\HFSWIN\
%SystemRoot%\system32\attrib.exe +R Jordans1.lbl
%SystemRoot%\system32\attrib.exe +R Jordans2.lbl
%SystemRoot%\system32\attrib.exe +R Jordans3.lbl
%SystemRoot%\system32\attrib.exe +R Jordans1.lbv
%SystemRoot%\system32\attrib.exe +R Jordans2.lbv
%SystemRoot%\system32\attrib.exe +R Jordans3.lbv
%SystemRoot%\system32\attrib.exe +R Jordans1.lbb
%SystemRoot%\system32\attrib.exe +R Jordans2.lbb
%SystemRoot%\system32\attrib.exe +R Jordans3.lbb
del /q *.lbl *.lbv *.lbb
%SystemRoot%\system32\attrib.exe -R *.lbl
%SystemRoot%\system32\attrib.exe -R *.lbv
%SystemRoot%\system32\attrib.exe -R *.lbb
--------------------8<----------------------
--
torgeir, Microsoft MVP Scripting and WMI, Porsgrunn Norway
Administration scripting examples and an ONLINE version of
the 1328 page Scripting Guide:
http://www.microsoft.com/technet/scriptcenter/default.mspx