T
Tom Sibley
I need to pull apart a variable. I know it's my lack of understanding with
the FOR command that's holding me back, so if anyone knows of a good web
site that explains FOR better then FOR /?, please let me know.
System variable is %USERNAME% (FName_LName)
The deliminator is "_"
I want to convert FName to one variable and LName to another variable. I
will later be using the two variables to create a folder name.
For /f "Tokens=1-2 Delims=_ " %%a in ('%USERNAME%') do (Set FName=%%a& Set
LName=%%b)
If Exist _%FName%-%LName% Goto :End
MD _%FName%-%LName%
the FOR command that's holding me back, so if anyone knows of a good web
site that explains FOR better then FOR /?, please let me know.
System variable is %USERNAME% (FName_LName)
The deliminator is "_"
I want to convert FName to one variable and LName to another variable. I
will later be using the two variables to create a folder name.
For /f "Tokens=1-2 Delims=_ " %%a in ('%USERNAME%') do (Set FName=%%a& Set
LName=%%b)
If Exist _%FName%-%LName% Goto :End
MD _%FName%-%LName%