How can I combine variables to name a folder?
Here is my current code. My script has delayedexpansion enabled:
Super User is a question and answer site for computer enthusiasts and power users. It only takes a minute to sign up.Sign up to join this community
You only need a single set of double-quotes, like this:
Sometimes it helps make your code more readable by building your variables in stages. For example:
Set Fullpath=%myPath%\%Letter% MkDir "%Fullpath%!Number!"
Note that when using this approach it's typically best to not put the double-quotes into the variables containing path elements and only include them in the actual executing commands. This reduces confusion and adds the flexibility of allowing you to combine variables containing path elements in various ways without having to worry about ending up with too many quotes as was the problem with your original statement.