How to move files by type in Windows with batch files

One way to move files in batches as needed, is to use the batch file. With the following command, you can easily move files by type from one folder to another.

Moving files, especially in large numbers, can be very time consuming in Windows. If you have images mixed with video files or documents stored in an incorrect folder, having to move them to the right place can be tedious. One way to move files in batches as needed, is to use the batch file. With the following command, you can easily move files by type from one folder to another.

How to move a file in batch files

See how to move files with a batch file. This is the command you will need to make the batch file work correctly in Windows.

move *.filetype %userprofile%folder

The type of files and folders will need to be changed depending on the type of file you want to move and where you want to move them. The article will take a closer look at this in a few examples.

1. Open Notepad.

2. Copy and paste the above command into the new document.

How to move files by type in Windows with batch files Picture 1How to move files by type in Windows with batch files Picture 1 Copy and paste the command into Notepad

3. Change File Type and Folder to the type of file you want to move and where you want to move them. Make sure to change the User Profile to your User Name on the PC.

In this example, the article author will move all the .DOCX files to the Blog folder .

4. Now, click File and choose Save As .

5. Click File name: at the bottom and change to All Types.

How to move files by type in Windows with batch files Picture 2How to move files by type in Windows with batch files Picture 2 Click File name: at the bottom and change to All Types

6. Save the file to whatever you want, but make sure you use the .BAT extension to save the file as a batch file and use it later.

You can move the batch file as you see fit. Wherever you drop a file, that will be the folder that will move the file from there. That means if you save the batch file to the Desktop and run the batch file, it will move any file that matches the File Type description into the Folder of your choice. This means that you only need to edit the batch file whenever you want to move the file to another folder.

Some notes when using batch files to move files

It is important to note that this batch file command will not work if the directory does not exist on the PC. It will not create folders, so you need to make sure you have created the folder before running the batch file or using the existing folder on the PC.

You can also run multiple move commands in a batch file, like this:

move *.docx %userprofile%blog move *.png %userprofile%blogpictures move *.mp4 %userprofile%blogvideos

You just need to add multiple move commands to the batch file, place the file where you want it to move and click on the file to start moving to other folders on the PC.

Whenever you need to change, you can open the batch file, edit it as needed and run to get the job done. This makes it easier for the Windows PC to move files without having to do each file individually or find the program to do so.

The batch file is a useful Windows utility that most users never even touch. With tricks like these, you can easily perform common tasks in Windows and make them easier to perform, such as moving files from one folder to another.

4 ★ | 37 Vote