How to sort files into folders, according to file names - Windows CMD

When organizing files, it is important to ensure that data is organized in an efficient manner for future reference. This is especially important for IT administrators, who are often tasked with managing large amounts of data. One way to ensure that files are organized properly is to use the Windows command line to sort them into folders based on their file names.

The Windows command line is a powerful tool that can be used to perform a variety of tasks, including sorting files. To do this, the command line must first be opened by typing “cmd” into the Windows search bar. Once the command line is open, the user must type in the command “forfiles” followed by the desired parameters. The parameters can include the directory in which the files are located, the type of files to be sorted, and the desired output folder.

For example, if the user wanted to sort all PDF files in a certain directory into a folder labeled “PDFs,” the command line command would look like this:

Forfiles /p “C:\\Documents\\” /m *.pdf /s /c “cmd /c move @file “C:\\Documents\\PDFs”

The “/p” parameter indicates that the user is searching for files in the “C:\\Documents\\” directory, while the “/m” parameter specifies that only PDF files are to be moved. The “/s” parameter tells the command line to search for files in any subfolders of the directory, and the “/c” parameter directs the command line to move all files to the “C:\\Documents\\PDFs” folder.

Once the command is entered and executed, the Windows command line will sort all PDF files in the specified directory into the “PDFs” folder. This will help ensure that all PDF files are organized properly and are easy to find when needed.

While sorting files by name is a simple process, it can be time-consuming if there are a large number of files to be sorted. In such cases, there are a few options that can be used to speed up the process. One option is to write a batch file, which is a series of commands that can be saved and executed with a single command. This can save time if the user plans to sort files into different folders on a regular basis.

Another option is to use a third-party software program to sort files. These programs typically allow users to specify the files to be sorted, the output folder, and other parameters, and then execute the sorting automatically. This can save a significant amount of time for IT administrators who need to sort large numbers of files on a regular basis.

Using the Windows command line to sort files into folders according to their file names is a simple and effective way to ensure that files are organized properly. By following the steps outlined above, IT administrators can quickly and easily organize their files in a way that makes them easy to find when needed.

Inquire Now

Thank you! Your submission has been received!
Oops! Something went wrong while submitting the form.
Find your next full or part-time role here

ScaleDesk can either help you find your next full time gig or a part time side gig where you can create extra income!

Onboard with us once
Skip HR screening and go to the final interview with with only your resume and a video interview you never have to redo
Get paid electronically every month for the hours you work
We will be your reference even if you work for us once

IT Teams: Use ScaleDesk to augment your team

Schedule Demo