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 In Subfolders

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. Step Open the command prompt

2. Step Enter the drive letter you want to go to e.g. C:

3. Step Enter cd C:\myfolder\path\this path needs to be the root directory with all the subdirectories!

4. Step Now simply enter this command

for /f "tokens=*" %a in ('dir /b /s /a-d') do @copy "%a" "C:\newpath\" /y

Moving Files From Subdirectories

REPLACE C:\newpath\ with your own path

5. Step 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.

5 of 5 0 (100%) 1 vote
- Cheers!


Written by:
Oliver is the founder and lead editor of this site. He is interested in finding new ways to break Windows, find common errors and help others to fix them. Aside from that, he loves to fully customize systems with Rainmeter and Dreamscene, find out more about ancient civilizations like the Chachapoya, sharpen his digital photography skills and create software with a small group of selected developers. If you would like to connect with him to discuss anything, send him a mail!

Learn More About.Me

Follow me on Twitter for daily updates: Twitter Follower

Contact The Author:
support@windows7themes.net

Get Free Help

Connect With Our Site:

 

   


Need help? Ask a question at our QA site, click the red button to get started:
Want to support us? Great, simply buy your favorite games from G2A via our referral link (g2a.com/r/win7themes) and save money at the same time:

Leave a Reply

Your email address will not be published. Required fields are marked *

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>

Current day month ye@r *