Abdullah_hassan
Abdullah_hassan

Reputation: 45

Error when delete files using bat

cd "D:\WWW\SEAP_P\Web\Sec.Seap.Application\prod\TSE\mailer_bin\sent"
echo y | del *.*

I want to delete all the files from sent directory,when i run the bat file.it delete all the file from my desktop.can i know what caused this?

Upvotes: 0

Views: 44

Answers (1)

Dark Cyber
Dark Cyber

Reputation: 2231

first please choose your destination drive then set directory you want to delete. here is looks like

D:
cd "WWW\SEAP_P\Web\Sec.Seap.Application\prod\TSE\mailer_bin\sent"
echo y | del *.*

make sure D: without "

or

cd /d "D:\WWW\SEAP_P\Web\Sec.Seap.Application\prod\TSE\mailer_bin\sent"
echo y | del *.*

as suggested by @SomethingDark in comment (Thanks BTW),

Let me know if it works.

Upvotes: 1

Related Questions