Dealing with quotes in Windows batch scripts

set "myvar=c:\my music & videos"

Notice the quotes start before myvar. It’s actually that simple.
Side note: myvar can’t be echoed afterwards unless it’s wrapped in quotes because & will be read as a command separator, but it’ll still work as a path.

http://ss64.com/nt/set.html under “Variable names can include Spaces”

Leave a Comment

tech