Forum Replies Created
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: https://stackoverflow.com/questions/47280217/was-unexpected-at-this-time-generated-from-batch-script-line-if-exist-file/47280406#47280406
It also contains a very good detailed reply by user magoo…
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.