22 jul 2010

Sustituir una columna en un archivo de texto

Supongamos que tenemos un archivo de texto con el contenido :
123 234 345 456 567 678 789 890
123 234 345 456 567 678 789 890
123 234 345 456 567 678 789 890
Y queremos sustituir "234" por algo :

@echo off
type texto.txt
for /f "tokens=1-8" %%a in ('type texto.txt') do (
echo %%a "RockoX" %%c %%d %%e %%f %%g %%h >> texto2.txt
)
echo:
type texto2.txt
Tip provisto por Tomi Salmi.

No hay comentarios:

Publicar un comentario

Creado por Dantas.es