- May
- 62
- 0
Through TCC 14.02.36 I had been running a CMD batch file distributed with the Windows port of Git under TCC with no problems. After the upgrade to TCC 14.02.37, the batch file fails.
I believe that the failure is caused by a change (regression? ;)) in the support of the special syntax for compatibility with CMDs syntax for referencing batch file parameters and the control variable of the FOR command. The indicated lines in the following CMD batch file and the outputs illustrate the difference.
I know that this may be a pretty bizarre use of CMDs syntax and that the TCC variable functions offer a superior method of stripping the path but:
I believe that the failure is caused by a change (regression? ;)) in the support of the special syntax for compatibility with CMDs syntax for referencing batch file parameters and the control variable of the FOR command. The indicated lines in the following CMD batch file and the outputs illustrate the difference.
Code:
why.cmd
@for /f "delims=" %%I in ("%~dp0..") do @echo %%I
@for /f "delims=" %%I in ("%~dp0..") do @echo %%~fI <==
Microsoft Windows XP [Version 5.1.2600]
C:\Documents and Settings\rchapman>why.cmd
C:\Documents and Settings\rchapman\..
C:\Documents and Settings <--
TCC 14.02.36 Windows XP [Version 5.1.2600]
[C:\Documents and Settings\rchapman]why.cmd
C:\Documents and Settings\rchapman\..
C:\Documents and Settings <--
TCC 14.02.37 Windows XP [Version 5.1.2600]
[C:\Documents and Settings\rchapman]why.cmd
C:\Documents and Settings\rchapman..
C:\Documents and Settings\rchapman.. <--
I know that this may be a pretty bizarre use of CMDs syntax and that the TCC variable functions offer a superior method of stripping the path but:
- I'm lazy and would like to use the CMD batch file as distributed :)
- If the change was intentional, I would like to know "why" for my education.