Jump to content

Recommended Posts

Posted

lo pepz..

I am prolly of the chart on this one, but it is annoying! What I want to do is to the delete everything below a certain directory (for example c:\temp). However, I dont wanna delete the temp dir, just all folders and files below it...

If I check the /? for del / erase and rmdir it doesnt really solve it (if I am not mistaken). rmdir /S comes closest but it will also delete the c:\temp which I wanna keep in this cfg. So, can anyone please prove me wrong? ;)

Also, I dont wanna right big messy .vbs enumerations and recursively delete all files or folders with diffrent commands.

Best Regards

ThaSausageEater...


Posted
cd c:\temp
del *.*
for /F %%a in ('dir /ad /b') do rd /s /q %%a

Thanks guys!

I will go with the IcemanND solution. Tried it and it did the work... again, thx!

Best Regards

ThaSausageEater..

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...