troubleshooting Question

Script almost there, but need more help

Avatar of bcameron70
bcameron70 asked on
Windows Batch
4 Comments1 Solution199 ViewsLast Modified:
Based upon the related question,  here is the script

@echo off
set basedir=c:\client
for /f %%a in ('dir %basedir% /ad /b') do echo mkdir "%basedir%\%%a\AV"
echo All directories created.

if one of the clients are named doe, john

the script only interprets the name up until the space between "," and "john" so the output looks like this

How do we get the script to take the whole dir field for the name (with the space included)?
Join the community to see this answer!
Join our exclusive community to see this answer & millions of others.
Unlock 1 Answer and 4 Comments.
Join the Community
Learn from the best

Network and collaborate with thousands of CTOs, CISOs, and IT Pros rooting for you and your success.

Andrew Hancock - VMware vExpert
See if this solution works for you by signing up for a 7 day free trial.
Unlock 1 Answer and 4 Comments.
Try for 7 days

”The time we save is the biggest benefit of E-E to our team. What could take multiple guys 2 hours or more each to find is accessed in around 15 minutes on Experts Exchange.

-Mike Kapnisakis, Warner Bros