Click here to Skip to main content
15,899,474 members
Please Sign up or sign in to vote.
1.00/5 (1 vote)
See more:
Dear All,


Again am hide a small problem. In a Text file have four lines each have

some word. For ex: Apple (Line 1)

Orange (Line 2)

Mango (Line 3)

Here i wanna edit line 3 only again and again when am press particular key(For ex, Am

change line3 to car, and again change car to Bike, then bike to Motor etc.) Here am

not need replace. Is this possible..? All replies are welcome...


Thanks in Advance

Dhinesh kumar.V
Posted
Comments
Sergey Alexandrovich Kryukov 2-Aug-12 1:49am    
There is nothing to advise here. This is just little (and boring) work you would need to do, by some weird reason. Why anyone would do it for you? If there is something you don't understand, we would gladly help you.
--SA

1 solution

The only way you can do this, is to replace the entire text file. There are no methods to 'edit' a file on your file system, you edit it by saving a new, edited version over the old one.
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900