π§° KPT-0002 | Create Folders from an Excel .csv File Using a Simple Batch Script
π’ Post ID: KPT-0002
If you loved the trick in KPT-0001, hereβs an even smoother one β using a .csv
file instead of a .txt
.
Weβll still use the same .bat
file approach, but this time weβre giving users the power of Excel + CSV to manage folder paths quickly.
π― What This Script Does
- Uses a
.csv
file containing folder paths (e.g.,India\Assam\Kamrup
) - Runs a lightweight
.bat
script to create those folders instantly - Works on any Windows PC β no installations, no admin rights, no extras
π±οΈ Just double-click the
.bat
file
π Boom! Your folders appear like magic
ποΈ It's automation, the old-school way β fast, clean, and offline
π Real Use Case: What If Your Data Isnβt Ready?
In government offices (like mine!), most Excel files look like this:
State | District |
---|---|
Assam | Kamrup |
Assam | Jorhat |
Assam | Sivasagar |
Assam | Dibrugarh |
Assam | Nagaon |
But our batch script canβt work with two columns β it needs a single folder path like:
India\Assam\Kamrup
India\Assam\Jorhat
India\Assam\Sivasagar
π οΈ Excel Hack to Fix This
Hereβs a quick Excel formula that combines columns into paths:
If your data is in columns A and B:
=TEXTJOIN("\", TRUE, "India", A2, B2)
Or, for older Excel:
="India\" & A2 & "\" & B2
π‘ Paste this in Column C and drag down β copy the result into a .csv
, and youβre done.
ποΈ Example Folder Paths
India\Assam\Kamrup India\Assam\Jorhat India\Assam\Sivasagar India\Assam\Dibrugarh India\Assam\Nagaon
π Download example_government_folder_data.csv
π Wrapping Up
This CSV method is great for:
- Government departments
- Office record keeping
- Anyone organizing district/state-wise data
It brings your Excel database to life in your Windows folders.
π₯ Get the Files
π Download Script & Sample CSV (.ZIP)
π Explore more tools:
ββββββββββ π€ THE KRITTIKA PROJECT π€ ββββββββββ
βοΈ Written by Amaljit Bharali | βοΈ Krittika Guides Me | The Rover Builds | 2025
Top comments (0)