1.

Solve : Inserting text-lines from file1.txt to win.ini?

Answer»

I want to insert 4 text-lines from file1.txt to the END of the win.ini file in c:\windows. My OS is windows XP.
I am at a loss as to how to do this. My application would not WORK unless I have the text lines inserted at the end of the win.ini file. I cannot ask the would-be user of my application to do this manually.
I want to accomplish this in a bat file. Grateful for any HELP to solve my problem.If you want to merge the contents of file1.txt with the win.ini file, you can use:

CODE: [Select]
copy c:\windows\win.ini+file1.txt c:\windows\newwin.ini
ren c:\windows\win.ini oldwin.ini
ren c:\windows\newwin.ini win.ini

Note: no PATH to file1.txt given; you'll have to fixup the code accordingly.

If you want 4 specific records from file1.txt put into win.ini, you will need some way to identify them and then set up a for loop to append them to win.ini.

The real question is why didn't your application append these 4 records to win.ini in the first place?

Good luck. Type edit after the cmd promptI did insert the required lines in win.ini through the application program. It worked fine!
Many thanks!



Discussion

No Comment Found