| 1. |
Solve : Help create folders from a txt file including subdirs? |
|
Answer» Hi. I found a simple BATCH program that will create directorie/folders from a txt file (ie., LIST.txt). It looks like this: Thanks. That was a typo. My txt file has '\'. The problem is when you add a space in the name: 'folder 1\subfolder1'. The program will only create:'folder'. It's probably a simple solution of which i don't know 1. The default token delimiter in FOR /F is a space, so FOR will stop at the first space in each line of folders.txt. You must make FOR take the WHOLE line by USING "delims=". 2. In mkdir or any other operation where a file, folder or path name has one or more spaces, use quote marks. You can use them anyway, they do no harm. mkdir "A folder name with spaces" Code: [Select]@echo off for /f "delims=" %%i in (folders.txt) do mkdir "%%i" |
|