Quickly Move All Files From Subdirectories To A Specific Path
Computer tasks are often mundane, but with a little knowledge about the command prompt or Powershell you can quickly move files from subdirectories to a specific path.
Moving files is a common task and it’s quite boring. If you have a lot of subfolders, it would be a waste of time to move them manually, so I suggest you take a look at this command
Copying Files Using The Tokens / Delims Command
1. Open the command prompt
2. Enter the drive letter you want to go to e.g. C:
3. Enter cd C:\myfolder\path\ – this path needs to be the root directory with all the subdirectories!
4. Now simply enter this command
for /f "tokens=*" %a in ('dir /b /s /a-d') do @copy "%a" "C:\newpath\" /y
REPLACE C:\newpath\ with your own path
5. Done! You moved all files from subfolders in C:\myfolder\path\ to C:\newpath\
As you can see, it’s really easy to move files with the command prompt using the tokens command.
If you want to find out more about how this work, I suggest you enter dir /? for a list of the command line switches that are used in this example.
Oliver is the founder and lead editor of this site. He is interested in finding new ways to break Windows, find common e.... Full Bio
Contact The Author: support@windows7themes.net















You love Windows, Gaming and everything digital? Great, we too! We have thousands of great Windows 7 themes, registry tweaks, tutorials, so please use our search box if you look for anything specific.
