The Command Prompt is so useful that it’s hard to not want to use it all the time. There are so many practical uses for it to expedite processes like cleaning up old Desktop items or ending running processes. Another helpful solution is when it comes to moving files. The simple move command can be set up in such a way to move all files under a certain file type.
Do you have many AVI video files mixed in with PNG images all listed in your Documents folder? This hectic mess needs to be and should be organized pronto. How will you find your images if they’re stashed away with documents or videos? We’ve described an easy way to extract file types from a folder and place them in their proper place on the computer. After reading this article you’ll be able to move all your documents/videos/images/downloads/etc. into their proper folders with ease, organizing your files as if they were in a download manager.
Make the Batch File to Move Files in Windows
The following command will move all JPG images from the current directory to the Pictures folder. To begin, you can either enter the command in the command prompt or create a batch file to run within any directory to do the moving.
For example, copy the following command:
move *.jpg %userprofile%\Pictures\
Now open Notepad from the Start menu and enter the command in the new file. Save this as MovePictures.bat. Be sure to change the Save as type drop down to All Files.
Now copy this file to your Desktop. Run the batch file to move every JPG image from the Desktop to the Pictures folder. If you need to clean up a different folder, like one full of videos and images, place the file in that folder and then open it.
Customize the Batch File
Customizing the batch file is very easy. Change which image files will be moved by modifying the *.jpg portion. However, ensure the * symbol is still present no matter what the file type it’s changed to. For example, here’s a way to move PNG files:
move *.png %userprofile%\Pictures\
Aside from changing the file type, you can change the destination folder too. Make the change to the final location, like so:
move *.png C:\Images\
Note: The folder must be present for the batch file to work else a syntax error will display in the command prompt. If you’re moving files to the C drive under a folder called Images, ensure the folder is actually present, for the batch file won’t create it.
Basically, this is the structure the command must take:
move *.FILETYPE LOCATION
This should be easy to remember because the command will move a file type to a location, just as the structure of the command has been written.
Now that it’s understood how to modify the command, you can combine a few modifications to move multiple file types at once. This can be done for not only image files but also video or executable files. To move multiple file types at once, create a batch file like this:
Organizing files is made easy with the Command Prompt. Literally any file type can be utilized, so experiment with it and see how clean and organized you can make your computer. You may even be able to use these commands and these Command Prompt alternatives here.
The above article may contain affiliate links which help support Guiding Tech. However, it does not affect our editorial integrity. The content remains unbiased and authentic.