elhacker.net cabecera Bienvenido(a), Visitante. Por favor Ingresar o Registrarse
¿Perdiste tu email de activación?.

 

 


Tema destacado: Como proteger una cartera - billetera de Bitcoin


  Mostrar Temas
Páginas: [1]
1  Programación / Scripting / Bat para juntar 2 ficheros txt en 1 por lineas en: 21 Julio 2010, 17:33 pm
Buenas

Estoy haciendo un bat que lee 2 ficheros txt distintos y escribe en otro mas uniendo la linea 1 de cada fichero.
SI el fichero 1.txt tiene
1
2
3
4
5
Y el fichero a.txt tiene
a
b
c
d
e
lo que busco es generar un fichero que sea
texto mio 1
texto mio a
texto mio 2
texto mio b
texto mio 3
texto mio c
texto mio 4
texto mio d

Consigo leer el fichero y darle el formato con un solo fichero usando un for /f %%I IN (1.txt) do
pero no se como leer el segundo sin que se me duplique todo, ya que si lo meto otro for dentro, me lo duplica todo...

He estado echando un vistazo por el foro, y he visto que separais en 2 ficheros uno, pero no unis por lineas...

Me podriais echar una manita??? Gracias
Páginas: [1]
WAP2 - Aviso Legal - Powered by SMF 1.1.21 | SMF © 2006-2008, Simple Machines