- Aug
- 7
- 0
The following line works in CMD, but not in TC (14.01.33):
The "app" in question has a subdirectory for every installed version, which ends in a two-digit version number. The above line is supposed to set %APPDIR% to the highest installed version.
In TC, the wildcards are not expanded. If I replace them with an existing version number, it works.
How do I do this in TC, or even better, is there a way to do it that will work in both CMD and TC?
Code:
for /d %a in ("%PROGRAMFILES%\app\version??") do set APPDIR=%a
The "app" in question has a subdirectory for every installed version, which ends in a two-digit version number. The above line is supposed to set %APPDIR% to the highest installed version.
In TC, the wildcards are not expanded. If I replace them with an existing version number, it works.
How do I do this in TC, or even better, is there a way to do it that will work in both CMD and TC?