Consider the following Windows batch script:
@echo off
echo Here 1
rem %~ta
echo Here 2...but not displayed as an error occurs
When executed the following is displayed:
Here 1
The following usage of the path operator in batch-parameter
substitution is invalid: %~ta
For valid formats type CALL /? or FOR /?
The syntax of the command is incorrect.
Change the %~ta
line to rem test
and the script completes.
The problematic line is commented out...why does it produce an error?