Moving files, especially when you have a lot of them, can be time consuming in Windows. If you have pictures mixed in with video files or documents stored within the wrong folder, it can be tedious to manually have to move them to the right place. If only there was a way to batch move files when you need it… That’s where this batch file comes into play. With the following command, you can easily move files by type from folder to folder.
How to Move Files with a Batch File
Let’s look at how to move files with a batch file. This is the command you’ll need to make the batch file work properly in Windows.
File type and folder will need to be changed depending on the types of files you want to move and where you want to move them to. We’ll look closer at this in a few examples.
1. Open Notepad.
2. Copy and paste the above command into the new document.
3. Change the File Type and Folder to what type of files you want to move and where you want to move them to. Make sure to change the User Profile to your User Name on the PC.
In this example, I’ll be moving all .DOCX files to my Blog folder.
4. Now, click on “File” and “Save As.”
5. Click on File name: at the bottom and change it to “All Types.”
6. Save the file as whatever you want, but make sure you use the .BAT extension to save it as a batch file to use later.
You can move the batch file as you see fit. Wherever you drop it, that’s the folder it’ll move files from. That means if you save it to your Desktop and run the batch file, it’ll move any files matching the File Type description to the Folder you choose. This means you simply have to edit the batch file any time you want to move files to another folder.
It’s important to note that this batch file command will not work if the folder doesn’t exist on your PC. It will not create the folder, so you need to make sure you either create one before running the batch file or use an existing folder on your PC.
You’re also able to run multiple move commands within a single batch file, like this:
You simply add more
move commands to the batch file, place the file where you want it to move files from and click on it to begin moving those files to other folders on your PC.
Any time you need to change what you move up, you can open the batch file, edit it as necessary and run it to get the job done. This makes it so much easier on a Windows PC to move files without having to do it one at a time or find a program to do it for you.
Batch files are a useful Windows utility that most users never even touch. With tricks like this, you can easily take mundane tasks in Windows and make them easier to accomplish, like moving files from one folder to another.