Source file, A.txt
7895537000011
7895537000028
7895537000035
7895537000042
7895537000059
7895537000066
7895537000011
7895537000011
7895537000028
7895537000028
7895537000028
7895537000059
7895537000059
Archive destination, B.txt
(I need a batch that gives me this result)
7895537000011,3
7895537000028,4
7895537000035,1
7895537000042,1
7895537000059,3
7895537000066,1
setLocal EnableDelayedExpansion
for /f "tokens=* delims= " %%a in (Inventario_%loja%_%dia%-%mes%-%ano%_%hour%h%min%m%secs%s.inv) do (
echo %%a,1 >>C:\Inventario\Inventario_%loja%_%dia%-%mes%-%ano%_%hour%h%min%m%secs%s\Inventario_%loja%_%dia%-%mes%-%ano%_%hour%h%min%m%secs%s.log
)
I tried editing the above script but it did not work very well, I do not know where to start.