Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

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
add comment

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

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

3 Answers

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

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
add comment
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
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.