Connecting Tech Pros Worldwide Forums | Help | Site Map

FSO - Is this possible?

Sarah
Guest
 
Posts: n/a
#1: Jul 19 '05
Hi.. I'm using FSO to write data to a file... each time the user
clicks a button, it uses the WriteLine method to write the data. I
want to put in an Undo button, which will remove the last line that
was written to the file.... Is this possible to do using FSO?

Thanks!

-Sarah

Aaron Bertrand [MVP]
Guest
 
Posts: n/a
#2: Jul 19 '05

re: FSO - Is this possible?


Basically, you read the file into memory, remove the line there, and then
re-create the file with the line missing. For a thorough tutorial, work
through http://www.aspfaq.com/2039

--
Aaron Bertrand
SQL Server MVP
http://www.aspfaq.com/


"Sarah" <no-spam~sarah@zhouse.com> wrote in message
news:jum950l8vhlan1stn2ic8tp4jgq86ou5n3@4ax.com...[color=blue]
> Hi.. I'm using FSO to write data to a file... each time the user
> clicks a button, it uses the WriteLine method to write the data. I
> want to put in an Undo button, which will remove the last line that
> was written to the file.... Is this possible to do using FSO?
>
> Thanks!
>
> -Sarah[/color]


Imran Salahuddin Khan
Guest
 
Posts: n/a
#3: Jul 19 '05

re: FSO - Is this possible?


Sarah!! i didn't get the complete picture of what problem you are
having... Aaron is right that you should load the whole file first and
then remove last line and then rewrite the updated contents again to the
file....

!mran Khan

*** Sent via Developersdex http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it!
Sarah
Guest
 
Posts: n/a
#4: Jul 19 '05

re: FSO - Is this possible?


On Sun, 14 Mar 2004 17:39:10 -0500, "Aaron Bertrand [MVP]"
<aaron@TRASHaspfaq.com> wrote:
[color=blue]
>Basically, you read the file into memory, remove the line there, and then
>re-create the file with the line missing. For a thorough tutorial, work
>through http://www.aspfaq.com/2039[/color]

Thanks Aaron... and thanks for that link too... Very helpful...
-Sarah
Sarah
Guest
 
Posts: n/a
#5: Jul 19 '05

re: FSO - Is this possible?


On Sun, 14 Mar 2004 22:39:30 -0800, Imran Salahuddin Khan
<itisimrankhan@hotmail.com> wrote:
[color=blue]
>Sarah!! i didn't get the complete picture of what problem you are
>having... Aaron is right that you should load the whole file first and
>then remove last line and then rewrite the updated contents again to the
>file....
>
>!mran Khan[/color]

Thanks Imran :)

Closed Thread