Advertisements

Are you struggling to organize all your work/study/hobby documents/videos/images?

Do you want to group them all by file types in one location?

Almost all of us have a mixture of files in our PCs, sometimes we want to separate the videos from the Word documents and other files, but it’s time-consuming especially when you have multiple subfolders and the list goes on.

In this practical tutorial, you will learn how to move files by type to a specific location.

We will be using the Command Prompt for this practice if you have any other methods or questions feel free to leave a comment below.

Let’s dive in!

Advertisements

1. The Simple Command to Move Files by Type

If you want to move the files that are placed in a single folder by type then use this command: move *.ext C:\destination, here are some examples.

cd D:\Downloads
move *.docx %userprofile%\Documents
move *.png %userprofile%\Pictures
move *.mp4 %userprofile%\Videos
Move Files By Type Cmd Command Prompt Windows 10 For In 1 Userprofile Documents

The downside of this command is that it doesn’t take subfolders into account. Use the 2nd command with for and /r to reach all files in subfolders…

2. The Best Command to Move All Files by Type

If your files are placed everywhere, in subfolders and subsubfolders and subsubsubsub…folders, then this command will do the trick.

Replace the following in the command with the appropriate extension.

  • SOURCE_DIR: Change this to your source directory, the folder where your files are at.
  • TARGET_DIR: This is the destination folder, change it.
FOR /R "C:\SOURCE_DIR" %i IN (*.pdf) DO MOVE "%i" "C:\TARGET_DIR"
Move Files By Type Cmd Command Prompt Windows 10 For In 2 For R Do Move Pdf

There you have it, you just learned how to move files by type using a single command line.

If you have any questions I am here to help ;)

Thanks for reading and don’t forget to share.

Soufiane – Easytutorial.com

Advertisements