0

hello all i have a list of log files & wants to convert it into text files. In my case i'm able to convert single log file (input: Trace0.log output: output0.txt) using java script command...

start java -jar USB_Trace_Decoder.jar -t Trace.tr -l Trace0.log -o outputlog\output0.txt.

I have to perform the above code multiple times with change in input and output filename in each iteration. How can i do the same to get desired result

4

1 回答 1

0

尝试这个:

@echo off
setlocal enabledelayedexpansion
set i=0
for /f "Tokens=*" %%a in ('dir /b /on trace*.log') do (
 echo start java -jar USB_Trace_Decoder.jar -t Trace.tr -l %%~nxa -o outputlog\output!i!.txt
 set /a i+=1
 )
于 2013-11-08T12:51:29.163 回答