HOWTO: Recursively Delete Directories on Windows

| No TrackBacks
OK, this may seem easy but I figured I would document this just in case it bugs anyone else like it bugged me.  It appears that the best way to recursively delete files and directories on Windows XP and Vista is using the "rd /s" command.  On previous versions of Windows, e.g., Windows 2000 and Windows 98, you could run the deltree command.  The deltree command was obsoleted on Vista and XP.  So, if you're ever in a command prompt and want to delete a directory, and all directories and files inside of it, think "rd /s".

C:\Mark>mkdir dog

C:\Mark>rd /s dog
dog, Are you sure (Y/N)? Y

Yea.

Did You Find this Helpful?

Did you find this post helpful, or at least, interesting?

  

Send Mark a Direct Message

If you'd like to send me a direct message, please do so below. However, I do not publicly post comments or messages submitted directly to me. So, if you're going to try to SPAM me, or my blog, you're pretty much wasting your time.

400 characters remaining

Error

About Mark

A Silicon Valley native, Mark Kolich is a full-time Software Engineer, a casual entrepreneur, and a consultant for hire. A web technologies expert, his current focus is on building powerful and robust cloud-driven web-applications using Java, PHP, Perl, AJAX, DHTML, CSS, and JavaScript. His favorite programming languages are PHP, Java and JavaScript. He uses Linux, enjoys biking to work, loves building great software, and always writes elegant, readable, and maintainable code.

No TrackBacks

No trackbacks attached to this entry.

Twitter (@markkolich)

Translate

About this Entry

This page contains a single entry by Mark Kolich published on December 18, 2008 9:30 AM.

HOWTO: Using a Web Proxy with XML-RPC (Java) was the previous entry in this blog.

Have Yourself a Merry USB Christmas (Tree) is the next entry in this blog.

Find recent content on the main index or look in the archives to find all content.