Super User is a question and answer site for computer enthusiasts and power users. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I am looking for a way to move all files and subfolders within a given directory to somewhere else and after the movement delete the original folder. For example, suppose in current path, there is a folder called FOLDERA, I am trying to move all files and subfolders from FOLDERA to the current path and then remove FOLDERA, but I need to do this with a command line. I try MOVE command but I find that it can only move the files. Anyway to do that? Thanks.

share|improve this question

migrated from stackoverflow.com Sep 24 '12 at 8:08

This question came from our site for professional and enthusiast programmers.

up vote 5 down vote accepted
del /s *.* should do the work in windows 7 
share|improve this answer

On Windows Vista or later, look at robocopy

NOTE: This question is off topic for Stack Overflow; Server Fault or Super User would likely be a better fit.

share|improve this answer
Robocopy <src> <dest> /MOVE

will move the files and delete the original directories.

There are several other options that you may wish to use to control overwriting etc.

share|improve this answer

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .