I have a batch script that has been happily running fine on our desktops and laptops running both W8.1 and W10 for some time now. The same exact script can't get past this last line of code without claiming "syntax error"
if not exist C:\epic\tablet.txt if not exist C:\epic\laptop.txt (
@set SVPATH="D:\EPIC\Backup\"
) else (
@set SVPATH="C:\EPIC\Backup\"
)
@echo %SVPATH%
if not exist %SVPATH% mkdir %SVPATH%
There are a bunch of lines of code after it, that again the laptops and desktops have no issues with, but the tablet can't get past that last line. It just gives the following output and then exits the script:
ECHO is on.
>The syntax of the command is incorrect
>if not exists mkdir
>
It looks like it's not actually setting a value to SVPATH, but as I said, this works just fine on both desktop and loptops running windows 8.1 and windows 10. It's only the Surface Pro 4s that have the issue, and it's not just one, it's all that we have tested.