Saved Bookmarks
| 1. |
Solve : batch to make folder based on input? |
|
Answer» Hey guyz im trying to make a batch that will create a folder based on user input
C:\batch>type Khasiar.bat Code: [Select]@echo off echo Enter folder name: set /p var= echo var %var% md %var% dir /ad kh* Output: C:\batch>Khasiar.bat Enter folder name: KHAS var Khas Volume in drive C has no label. Volume SERIAL NUMBER is F4A3-D6B3 Directory of C:\batch 01/24/2010 05:25 PM Khas 0 File(s) 0 bytes 1 Dir(s) 303,069,970,432 bytes free C:\batch>Quote from: Khasiar on January 24, 2010, 04:01:26 PM Hey guys I'm trying to make a batch that will create a folder based on user input Code: [Select]@echo off echo Usage xxh.bat "folder name" pause md %1 dir /ad %1* Output: C:\batch>xxh.bat john Usage xxh.bat "folder name" Press any key to continue . . . Volume in drive C has no label. Volume Serial Number is F4A3-D6B3 Directory of C:\batch 01/25/2010 12:30 PM john 0 File(s) 0 bytes 1 Dir(s) 303,028,146,176 bytes free C:\batch>Code: [Select]@echo off set /p fname =Folder Name: md %fname% |
|