I was trying to open a folder on every lab computer using a batch script. The computers are labeled 01,02,03-18. I didn't think there was a way to convert the number from 1 to 01 so I used an if statement. But I am getting an error that says 9 was unexpected at this time
@echo off
setlocal enabledelayedexpansion
SET "z=0"
SET "n=9"
for /L %%x in (1,1,18) do (
SET v=%%x
IF %v% LEQ %n%
(
SET num=%z%%v%
) ELSE (
SET num=%v%
)
start "" "\\lab-!num!\
pause
)