I'm a noob at batch programming so excuse me for the simple question.
I have a folder called FSC in C:\TTG\FSC, with a thousand and thousand of text files called like 1_A.txt 2_A.txt etc. I would like to run a programm and have its output in another file renaming the original one ( for ex. 1_A.txt will have an output file called 1_A_out.txt ). I have already tested to run the programm on 1 file and it works (simply writing on the command line tag-french filename).
So how can I create the for loop for parsing each file on the folder and create the output files?
I've tried this but it doesn't work
for /F %%i in ('dir /b "c:\treetagger\FSCB1\"') do
tag-french %%i > %%i_out
I can do it in ubuntu writing this :
for l in /home/sp/Desktop/FSCM5/*
do
echo $l
filename=$(basename "$l")
extension="${filename##*.}"
filename="${filename%.*}"
filename=($(echo "/home/sp/Desktop/FSCM5TTG/"$filename"_"ttg"_."$extension))
echo $filename
sh /home/sp/Desktop/TTG/cmd/tree-tagger-french $l > $filename
done
But I would like to learn how to do this in windows too