Put columns on lines [Mettre des colonnes sur des lignes]
Posted: 21 Jan 2014 06:28
Hello everybody,
I have a text file "CLOLG.txt" that contains 4 Ligns :
Ligne 1....
Ligne 2....
Ligne 3....
Nom1 PNom1 Add1 DMA1 CL.M1 ccR1Nom2 PNom2 Add2 DMA2 CL.M2 ccR2Nom3 PNom3 Add3 DMA3 CL.M3 ccR3 ... Nomi PNomi Addi DMAi CL.Mi ccRi ...
I want the result as following :
Ligne 1....
Ligne 2....
Ligne 3....
"1","Nom1 ","PNom1 ","Add1 ","DMA1 ","CL.M1 ","ccR1"
"2","Nom2 ","PNom2 ","Add2 ","DMA2 ","CL.M2 ","ccR2"
"3","Nom3 ","PNom3 ","Add3 ","DMA3 ","CL.M3 ","ccR3"
...
"i","Nomi ","PNomi ","Addi ","DMAi ","CL.Mi ","ccRi
...
and this my cod
code:
THE PROBLEM's in ccRiNomi
Thanks.
I have a text file "CLOLG.txt" that contains 4 Ligns :
Ligne 1....
Ligne 2....
Ligne 3....
Nom1 PNom1 Add1 DMA1 CL.M1 ccR1Nom2 PNom2 Add2 DMA2 CL.M2 ccR2Nom3 PNom3 Add3 DMA3 CL.M3 ccR3 ... Nomi PNomi Addi DMAi CL.Mi ccRi ...
I want the result as following :
Ligne 1....
Ligne 2....
Ligne 3....
"1","Nom1 ","PNom1 ","Add1 ","DMA1 ","CL.M1 ","ccR1"
"2","Nom2 ","PNom2 ","Add2 ","DMA2 ","CL.M2 ","ccR2"
"3","Nom3 ","PNom3 ","Add3 ","DMA3 ","CL.M3 ","ccR3"
...
"i","Nomi ","PNomi ","Addi ","DMAi ","CL.Mi ","ccRi
...
and this my cod
code:
Code: Select all
@echo on
mode 50,10&color a
set i=0
For /l %%a in (1,1,325) DO call :AAA %%a
z.txt
exit
:AAA
for /F "tokens=%1 delims=" %%a in (CLOLG.txt) DO (
echo "%i%","%%a">>z.txt
set /a i+=1
)
exit /B
THE PROBLEM's in ccRiNomi
Thanks.