In IF statements, there should be a space before and after ==.
If you posted the output from accurev and the expected and actual output from the bat file, it would be easier to figure out the problem.
Do you have a reason for wanting to run the bat file under TCC instead of using cmd?
Thanks for the replies.
I want to run the .bat file in TCC because I hoped (expected?) TCC was compatible, and I wouldn't have to run TCC and cmd.exe at the same time...
Here's the output from the accurev command (output is xml, and the formatting was lost when I copied and pasted into this post):
[C:\bin]
>accurev show -fx -p JPSoft streams
<?xml version="1.0" encoding="utf-8"?>
<streams>
<stream
name="JPSoft"
depotName="JPSoft"
streamNumber="1"
isDynamic="true"
type="normal"
startTime="1131726198"/>
<stream
name="JPSoft_work"
basis="JPSoft"
basisStreamNumber="1"
depotName="JPSoft"
streamNumber="2"
isDynamic="true"
type="normal"
startTime="1131726232"/>
<stream
name="JPSoft_work_ragnarokII"
basis="JPSoft_work"
basisStreamNumber="2"
depotName="JPSoft"
streamNumber="17"
isDynamic="false"
type="workspace"
startTime="1294923718"/>
<stream
name="JP-FallLine_fallline"
basis="JPSoft_work"
basisStreamNumber="2"
depotName="JPSoft"
streamNumber="18"
isDynamic="false"
type="workspace"
startTime="1296164739"/>
</streams>
It appears the first problem occurs with this line:
Code:
FOR /F "tokens=1,2 delims==" %G IN ('accurev show -fx -p JPSoft streams') DO (@echo %G)
The output from cmd.exe, (runs in ~1 sec):
[C:\bin]
>FOR /F "tokens=1,2 delims==" %G IN ('accurev show -fx -p JPSoft streams') DO (@echo %G)
[C:\bin]
>()
<?xml version
[C:\bin]
>()
<streams>
[C:\bin]
>()
<stream
[C:\bin]
>()
name
[C:\bin]
>()
depotName
[C:\bin]
>()
streamNumber
[C:\bin]
>()
isDynamic
[C:\bin]
>()
type
[C:\bin]
>()
startTime
(Only quoted output from 1st stream)
And the output from TCC:
C:\bin]
>timer & FOR /F "tokens=1,2 delims==" %G IN ('accurev show -fx -p JPSoft streams') DO (@echo %
G) & timer
Timer 1 on: 14:31:57
TCC: (Sys) The filename, directory name, or volume label syntax is incorrect.
"C:\bin\?xml"
TCC: (Sys) The system cannot find the file specified.
""
TCC: (Sys) The system cannot find the file specified.
"C:\bin\stream"
name
depotName
streamNumber
isDynamic
type
startTime
TCC: (Sys) The system cannot find the file specified.
""
Timer 1 off: 14:32:24 Elapsed: 0:00:26.42
(Again, I snipped all but the output from the 1st stream.)