delete from position 80 to the end line

Microsoft Windows xp professional w/sp2
May 18, 2010 at 15:17:54
Specs: DOS
How can I add to this script? I want to delete all the characters after position 80 of a text file to the end of each line(for apprx len of 265).

for /f "tokens=* delims= " %%a in (Q:\Downloads\EDI.spr.A5E_A55.txt) do (
>> Q:\Downloads\testA5E.txt echo %%a
set S1=%%a
set S1=!S1:~80,60!
>> Q:\Downloads\testA5E.txt echo XX1!S1!
set S2=%%a
set S2=!S2:~141,60!
>> Q:\Downloads\testA5E.txt echo XX2!S2!
set S3=%%a
set S3=!S3:~202,60!
>> Q:\Downloads\testA5E.txt echo XX3!S3!
set S4=%%a
set S4=!S4:~263,83!
>> Q:\Downloads\testA5E.txt echo XX4!S4!
)


See More: delete from position 80 to the end line

Report •


#1
May 18, 2010 at 16:39:56
set S5=%%a
!S5:~0,80!

Report •
Related Solutions


Ask Question