How To Guides Org

Easy: Move or Copy All Files In Subdirectories To New Folder via Command Prompt

If you have stored a lot of files in various subdirectories and you don’t have time to move them up manually which could take hours, you can use this command prompt trick to copy all files to a new folder and save a lot of time


Open Command Prompt Here

1. Step Open the folder with all the subdirectories

2. Step Now go back one level e.g. if the subdirectories are in C:\folder\subdirectories then go to C: and select C:\folder

3. Step Hold down the shift-key and click on the folder with all the sub-directories e.g. C:\folder

Using the Command Prompt To COPY Files In Subdirectories

4. Step Now make sure you are in C:\folder or wherever your subdirectories are. Then copy and paste this code and modify C:\newfolder to your destination folder for /f "tokens=*" %a in ('dir /b /s /a-d') do @copy "%a" "C:\newfolder\" /y

Example:

5. Step This command COPIES the files from the subdirectories straight to the the new folder – this is great because you can verify that all files are actually copied before deleting the actual folder

Still having problems moving files from subdirectories? Post a comment below or visit qa.windows7themes.net