- Nov
- 33
- 0
Hi guys, I've compiled a .btm batch with te latest version of Take Command (v29), and this .btm runs with the latest version of TCC-RT (v29).
This is the original .cmd batch:
As you can see, in the PowerShell Write-Host command I had to add "-NoNewline" followed by "ECHO/" so that I could have a proper carriage return.
The are 2 problems:
1) Launching the btm file, at least 3 times out of 10 (randomly) the log file after "ERROR." does not wrap.
2) In other cases, the btm file returns the error as output, but it does not exit and continues to run subsequent commands.
Wanting to maintain full compatibility with CMD, how should I set up the TCMD.ini file? And how could I solve the problems encountered?
Thanks!
This is the original .cmd batch:
Code:
SETLOCAL ENABLEEXTENSIONS DISABLEDELAYEDEXPANSION
IF NOT EXIST "%~dp0FOLDER" (
PowerShell -Command "Write-Host [$(Get-Date -Format 'yyyy/dd/MM HH:mm:ss')] ERROR. -NoNewline">>"%~dp0LOG.log" & ECHO/>>"%~dp0LOG.log"
EXIT)
PUSHD "%~dp0FOLDER"
IF NOT EXIST "%~dp0FILE.ini" (
PowerShell -Command "Write-Host [$(Get-Date -Format 'yyyy/dd/MM HH:mm:ss')] ERROR. -NoNewline">>"%~dp0LOG.log" & ECHO/>>"%~dp0LOG.log"
EXIT)
...
other commands
As you can see, in the PowerShell Write-Host command I had to add "-NoNewline" followed by "ECHO/" so that I could have a proper carriage return.
The are 2 problems:
1) Launching the btm file, at least 3 times out of 10 (randomly) the log file after "ERROR." does not wrap.
2) In other cases, the btm file returns the error as output, but it does not exit and continues to run subsequent commands.
Wanting to maintain full compatibility with CMD, how should I set up the TCMD.ini file? And how could I solve the problems encountered?
Thanks!