Home > Software engineering >  Windows batch file: pathname with "&" interpreted as two commands
Windows batch file: pathname with "&" interpreted as two commands

Time:11-14

I have a batch file which gets its own short pathname (to eliminate spaces, which gcc doesn't like) for use in subsequent commands:

set base=%~d0%~sp0

This works fine for most cases; for example, if the batch file is located in C:\Program Files, the value of

  • Related