Auto create folder based on filename and move the file into it's folder

This is a Windows batch script that creates folders for each file in the current folder that the script is running. The folders are created with folder names that follow the filenames. After creating the folder, it will move the file into it's own folder. This batch script is particularly useful in organizing files into it's own folder.

Step 1 : Copy the Windows batch code below into your notepad and save it with filename "organize.bat".

@echo off
for %%i in (*) do (
if not "%%~ni" == "organize" (
md "%%~ni" && move "%%~i" "%%~ni"

Step 2 : Copy organize.bat file to the folder where there are files that you want to organize each file to be copy into a folder which has the same name as the filename.

Step 3 : Double click organize.bat file and watch the magic begins.


Popular posts from this blog

How to recalibrate your Samsung Note 4 battery

A Better SKMEI 1358 Instructions Manual

How to import Tasker projects, profiles, tasks and scenes

How to turn your Windows 7 laptop or dekstop into a WiFi repeater or extender

A Better SKMEI 1418 / 1427 Instructions Manual