Given a folder with several subdirectories, I want to move their contents to the top folder and remove the subdirectories. How can I do that on the Windows command line?
E.g. I have a folder named "Jack" in D:. It contains several subfolders and each subdirectory contains additional files (text files, PDF files, etc.), but no directories. I want to move all subfolders' files into "Jack", and remove the then empty subdirectories.
If duplicate file found do replace or do nothing, I need only one copy
I need to do this repeatedly, so a batch solution would be best.
D:\Jack\A\1.pdfandD:\Jack\B\1.pdf? – Daniel Beck♦ Oct 9 '12 at 5:18xcopyto do this. Typexcopy /?at the command prompt for usage information. – martineau Oct 9 '12 at 7:17