HI

Someone can write me a cmd script that deletes all directories (including the system and hidden directories) of an hard-disk except those that belong to a list of specific directories in the subdirectory \Users\[Account-users]\ ?

Unfortunately, I'm not a programmer and I do not know how to write this script.

THANKS

BYE

P.S This script must work with Windows PE 2.1 32/64 bit and with Vista SP1 32/64 bit.
0 Comments   [ + ] Show Comments

Comments

Please log in to comment

Rating comments in this legacy AppDeploy message board thread won't reorder them,
so that the conversation will remain readable.

Answers

0
I can help you......I will give you a bat file, and you just have to enter which directories you want to delete. Will it be ok?
Answered 06/17/2009 by: suchi.jigar
Purple Belt

Please log in to comment
0
ORIGINAL: suchi.jigar

I can help you......I will give you a bat file, and you just have to enter which directories you want to delete. Will it be ok?


Ok. You can create a cmd script instead of a bat script?

THANKS

BYE
Answered 06/17/2009 by: balubeto
Senior Yellow Belt

Please log in to comment
0
They're the same thing, but with a different extension.
Answered 06/17/2009 by: VBScab
Red Belt

Please log in to comment
0
ORIGINAL: VBScab

They're the same thing, but with a different extension.


So, I expect your script.

THANKS

BYE
Answered 06/17/2009 by: balubeto
Senior Yellow Belt

Please log in to comment
0
...and I expect your payment. I don't work for free :)
Answered 06/18/2009 by: VBScab
Red Belt

Please log in to comment
0
Just use a cmd file with this code. But I don't know which directory you want to delete...

cmd.exe /c RD "%ProgramFiles%\DUMMYFOLDER" /S /Q
or
cmd.exe /c RD "%SYSTEMROOT%\DUMMYFOLDER" /S /Q
or
cmd.exe /c RD "%CommonProgramFiles%\DUMMYFOLDER" /S /Q

Cheers
Answered 08/03/2009 by: McRip
Orange Senior Belt

Please log in to comment
0
Hi, u can use below script as well for your reference.

@echo off
IF EXIST C:\Nvidia\ rmdir /S /Q C:\Nvidia > NUL
IF EXIST C:\Ati\ rmdir /S /Q C:\Ati > NUL
IF EXIST C:\Temp\ rmdir /S /Q C:\Temp > NUL
IF EXIST C:\Windows\Temp\ rmdir /S /Q C:\Windows\Temp > NUL
md c:\Windows\temp
FOR %%d IN (c: d: e: f: g: h: i: j: k: l: m: n: o: p: q: r: s: t: u: v: w: x: y: z:) DO IF EXIST %%d\RECYCLER cacls %%d\RECYCLER /E /G %USERNAME%:F > NUL
FOR %%d IN (c: d: e: f: g: h: i: j: k: l: m: n: o: p: q: r: s: t: u: v: w: x: y: z:) DO IF EXIST %%d\RECYCLER rmdir /S /Q %%d\RECYCLER > NUL
FOR %%d IN (c: d: e: f: g: h: i: j: k: l: m: n: o: p: q: r: s: t: u: v: w: x: y: z:) DO IF EXIST %%d\$RECYCLE.BIN rmdir /S /Q %%d\$RECYCLE.BIN > NUL
FOR %%d IN (c: d: e: f: g: h: i: j: k: l: m: n: o: p: q: r: s: t: u: v: w: x: y: z:) DO IF EXIST "%%d\System Volume Information" cacls "%%d\System Volume Information" /E /G %USERNAME%:F > NUL
FOR %%d IN (c: d: e: f: g: h: i: j: k: l: m: n: o: p: q: r: s: t: u: v: w: x: y: z:) DO IF EXIST "%%d\System Volume Information" rmdir /S /Q "%%d\System Volume Information" > NUL
#here is for polish lang in english change from \ustawienia lokalne\ to \local settings\
rmdir /S /Q "%USERPROFILE%\Ustawienia lokalne\temp"
rmdir /S /Q "%USERPROFILE%\Ustawienia lokalne\Temporary Internet Files\Content.IE5\"
Answered 08/04/2009 by: abking99
Second Degree Blue Belt

Please log in to comment
Answer this question or Comment on this question for clarity