G
Guest
Hello.
How do you erase a specific line in a *.txt file?
Thanks in advance.
How do you erase a specific line in a *.txt file?
Thanks in advance.
Follow along with the video below to see how to install our site as a web app on your home screen.
Note: This feature may not be available in some browsers.
Xero said:How do you erase a specific line in a *.txt file?
Xero said:Hello.
How do you erase a specific line in a *.txt file?
Larry Serflaten said:[...]How do you erase a specific line in a *.txt file?
To erase data from a file, you have to build a new file with the desired
data omitted. If you can overwrite the original file with new data, fine,
but more often you will simply create a new file and copy only those
portions you want to keep....
Never made a video tape as in Larry's sample probably?ACK. But there is one drawback with the latter method: The file's
creation
timestamp will change.
Cor Ligthert said:Never made a video tape as in Larry's sample probably?
Herfried said:Larry Serflaten said:How do you erase a specific line in a *.txt file?
[...]
To erase data from a file, you have to build a new file with the desired
data omitted. If you can overwrite the original file with new data, fine,
but more often you will simply create a new file and copy only those
portions you want to keep....
ACK. But there is one drawback with the latter method: The file's creation
timestamp will change.

So.. just change it back.. I'm sure there's an API for that somewhere.
Touch.exe brings back memories![]()
Cor said:Rinze,
In my opinion is this no answer.
Can you give us the link to that API or tell how it works.
Cor
I don't know it off hand, but with older progamming languages there was
touch.exe to change the date/time of a file. I used that to give all files
of a program in those days the same date/time, or sneak a version into the
time (like 6:32 is version 6, subverion 32). So there must be an API to
change the date/time of a file.
ffsCor said:Rinze,
Changing the datetime of a file is quiet different from changing "1 april
2004" to "5 december 2004" as a text in a file.
For the first you can by instance use this one
http://msdn.microsoft.com/library/d...miofilesysteminfoclasslastaccesstimetopic.asp
Cor
Want to reply to this thread or ask your own question?
You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.