Family Encyclopedia >> Electronics

How to Effortlessly Sort and Organize Files by Type in Windows

As a seasoned Windows user and IT professional, I've relied on the Command Prompt for years to streamline file management. It's perfect for tasks like decluttering your desktop or quickly relocating files. One of my favorite tricks is using the move command to automatically sort files by type.

Imagine your Documents folder cluttered with AVI videos, PNG images, and scattered docs—a recipe for frustration. Finding that one image buried among videos? Nearly impossible. That's why I've perfected a simple batch file method to extract and relocate files into dedicated folders, mimicking a smart download manager. Follow this guide, and you'll organize images, videos, documents, and more in minutes.

Create a Batch File to Sort Files in Windows

This command moves all JPG files from the current directory to your Pictures folder: move *.jpg %userprofile%\Pictures\. Enter it directly in Command Prompt or save it as a reusable batch file.

Open Notepad from the Start menu, paste the command, and save as MovePictures.bat. Select All Files in the Save as type dropdown to avoid a .txt extension.

How to Effortlessly Sort and Organize Files by Type in Windows

Copy the .bat file to your Desktop (or any target folder). Double-click it to instantly move all JPGs to Pictures. For other folders, like one mixed with videos and images, just place the file there and run it.

Customize Your Batch File for Any File Type

How to Effortlessly Sort and Organize Files by Type in Windows

Editing is straightforward: Swap *.jpg for your desired extension, keeping the asterisk (*) for wildcards. For PNGs: move *.png %userprofile%\Pictures\.

Adjust the destination too: move *.png C:\Pictures\.

Note: The target folder must exist beforehand—the script won't create it, or you'll see a syntax error. Verify paths like C:\Pictures exist first.

The basic structure is: move *.FILETYPE LOCATION. Easy to remember—move a file type to a place.

How to Effortlessly Sort and Organize Files by Type in Windows

For multiple types, chain commands in one file:

move *.png %userprofile%\Pictures\
move *.gif %userprofile%\Pictures\GIFs\
move *.mp3 %userprofile%\Music\
move *.mkv %userprofile%\Videos\
move *.avi %userprofile%\Videos\

How to Effortlessly Sort and Organize Files by Type in Windows

Conclusion

Command Prompt makes file organization a breeze for any type—images, videos, executables, you name it. Experiment confidently to keep your PC tidy and efficient.