( was unexpected at this time - batch script

前端 未结 3 699
别跟我提以往
别跟我提以往 2021-02-08 01:10

I\'m using the batch script below and get an error

( was unexpected at this time.

I know that the problem is in the first line but

3条回答
  •  感情败类
    2021-02-08 02:00

    I had a very similar problem and code construct that was causing me a lot of pain to resolve. My error message was ". was unexpected at this time"...

    It took me a couple long days to figure out another similar consideration due to this problem... Please take a look a the following problem and subsequent solution here: ". was unexpected at this time" generated from batch script line 'if exist [file] (...

    The solution was simply the treatment of '(' and ')' on ECHO lines inside an IF statement block.

    The point is, do consider treatment of special characters as a possible source of a problem when troubleshooting IF (and possibly FOR) statements.

    HTH someone...

提交回复
热议问题