Automatically organize files by file type

NC

Your folder can be so cluttered with all kinds of files, it's terrible to see them. In this article, I will show you a little trick to organize them into separate folders.

Step 1 : Create a new file in your messy folder

Create a TXT file. Copy and paste the text as follow:

@echo off
for %%a in (".\*") do (
      if "%%~xa" NEQ "" if "%%~dpxa" NEQ "%~dpx0" (
            if not exist "%%~xa" mkdir "%%~xa" (
                   move "%%a" "%%~dpa%%~xa\"
            )
       )
)

Then, save it as "zsort.bat". You give any name as per your choice, but make sure you give the extension of the file as bat.

Automatically organize files by file type

Step 2 : Run "zsort.bat"

The rest is very simple, you just need to double-click the newly created file.

Automatically organize files by file type

In a flash, files are automatically organized into different folders.

Automatically organize files by file type

Facebook: https://www.facebook.com/routerbest

Twitter: https://twitter.com/routerbestcom

Tags: Windows