How to move files by type in Windows with batch files
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.
Copy and paste the command into Notepad3. 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.
Click File name: at the bottom and change to All Types6. 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.
You should read it
- How to 'Cut and Paste' Files on Mac
- How to Move to a New PC
- How to batch rename files on Windows without software
- How to add / remove Move to OneDrive context menu in Windows 10
- Move files easily between PCs with EasUS Todo PCTrans Professional 10.0
- 4 Ways to copy files faster in Windows
- How to batch delete files on Windows 10
- How to Delete a File in Microsoft Windows Using Batch Files
- How to add 'Move to' or 'Copy to' to the Windows 10 context menu
- How to Move Files from One PC User to Another
- How to Move the Windows Junk file folder to another drive
- How to view recently deleted files on Windows 10?