.bat - deletes content of drive

Intel / Xeon
February 23, 2009 at 01:22:39
Specs: Windows XP, intel Xeon, 32 GB ram

I want a batch file that deletes the full content of a directory.
The directory is called "T" and is used for temp purposes. Every night this batch file has to delete the content of this drive, T, including sub directory's.

This is what i searched for on the net:

@echo off
del /q /s T:/
for /d %%a in (T:/) do rd /s /q "%%a)

But it is not working... can anyone please help me?


See More: .bat - deletes content of drive

Report •

February 23, 2009 at 02:57:42
Try this:

@echo off
rem change the driveletter for your needs
rem change the directoy for your needs
cd \temp
del /S /Q *.*
for /d %%a in (*) do rd /s /q "%%a

Please send a reply, if you solved the problem !!!

Report •
Related Solutions

Ask Question