Computing.Net > Forums > Windows XP > .bat - deletes content of drive

Computer Problems? Computing.Net has over 1,000,000 posts about all things technology related! Over 90% answered within 24 hours! Click here to start participating now! Also, be sure to check out the New User Guide.

.bat - deletes content of drive

Reply to Message Icon

Name: Bart slot
Date: February 23, 2009 at 01:22:39 Pacific
OS: Windows XP
CPU/Ram: intel Xeon, 32 GB ram
Product: Intel / Xeon
Subcategory: General
Comment:

Hello,

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?

Thnx



Sponsored Link
Ads by Google

Response Number 1
Name: paulsep
Date: February 23, 2009 at 02:57:42 Pacific
Reply:

Try this:

@echo off
rem change the driveletter for your needs
c:
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 !!!


0
Reply to Message Icon

Related Posts

See More







Post Locked

This post is quite old and has been locked from receiving new replies. Please create a new posting instead.


Go to Windows XP Forum Home


Sponsored links

Ads by Google


Results for: .bat - deletes content of drive

How Do I delete my c drive www.computing.net/answers/windows-xp/how-do-i-delete-my-c-drive/39525.html

I cant acccess the contents of e drive www.computing.net/answers/windows-xp/i-cant-acccess-the-contents-of-e-drive/178210.html

Contents of My Network Places. www.computing.net/answers/windows-xp/contents-of-my-network-places/151160.html