ZTree.com  | ZEN  | About...  

 Index   Back

[General] is there a way to append two lines to many text files?   [General]

By: Ryan       
Date: Jan 12,2022 at 21:42
In Response to: [General] is there a way to append two lines to many text files? (Ben Kent)

this was what i needed 1st urgently, adding 2 lines to 200 batches. then later i wanted to generalize the script to where to insert and how many lines to insert "skip" meant insertion starts after the skip number.
before
1
2
3
4
5


after
1
SET K0="..\GAMEPATH.TXT"
FOR /F "Tokens=*" %%V IN ('TYPE %K0%') DO (SET K1=%%V)
2
3
4
5

i made batch files of your scripts and put them in #zttag
:SUB
aa.bat %%2
:goto :end

delete one didnt work if the file had spaces
insert batch didnt work,i think the script was corrupted

583 views      
 

Messages in this Thread

 
96,664 Postings in 12,235 Threads, 350 registered users, 195 users online (0 registered, 195 guests)
Index | Admin contact |   Forum Time: Jun 16, 2024 - 3:11 pm UTC  |  Hits:64,851,401  (61,461 Today )
RSS Feed