Getting full (or short) folder name with white space in loop
Posted: 14 Jun 2010 06:50
Getting full (or short) folder name with white space in loop
Hello, I’m tiring to get all folder name and only folder in loop. I have problem because folder name have whitespace. My loop
for /f %%a in ('dir /b /ad') do (
ECHO "%%a"
)
So if folder name is e.g. “Folder name 1” I’m getting only “Folder”. So how to get full folder name?
I think if I get short name e.g. “Folder~1” also will by good.
I’m need this because I’m trying to write some script which adding user privileges to folders and I’m using for this XCACLS
Ps. Sorry for my horrible English.
Hello, I’m tiring to get all folder name and only folder in loop. I have problem because folder name have whitespace. My loop
for /f %%a in ('dir /b /ad') do (
ECHO "%%a"
)
So if folder name is e.g. “Folder name 1” I’m getting only “Folder”. So how to get full folder name?
I think if I get short name e.g. “Folder~1” also will by good.
I’m need this because I’m trying to write some script which adding user privileges to folders and I’m using for this XCACLS
Ps. Sorry for my horrible English.