I am performing a certain operation on a number of files and following is the bat file script written for it. names of the files are of this type: aspen_1M_bursty_25_1.pcap
@FOR /L %%i in (1,1,10) do (
@%decoder% -i L:\martin\05_distorted\Elecard\%~n1_bursty_25_%%i.pcap -o L:\martin\05_distorted\Elecard\%~n1_bursty_25_%%i.avi
)
Th problem is, this script adds '-' inside and ends up calling the command like the following:
-i L:\martin\05_distorted\Elecard\-_bursty_25_1.pcap -o L:\martin\05_distorted\Elecard\-_bursty_25_1.avi
^ ^
Hence it would return an error that there is no such file as the names of the files have no '-' in them:
The above script is in a bat file and I am calling the bat file through command prompt.
How to get rid of this '-' thing? :)
>, not->. Usename.bat aspen_1M >log.txt.