Click here to Skip to main content
15,920,438 members
Please Sign up or sign in to vote.
2.50/5 (2 votes)
See more:
Hi,
We have using Reader and writer for video file download from Online.
I have use following codes for reading,writing,appending Video file.
but here appended file separated from already downloaded File.But i need
Appending also done in same File.


reading
------------
C#
webResp.GetResponseStream().Read(..)


Writing
-------------
C#
FileStream writer = new FileStream(this.LocalDirectory + "\\" + file.Name, System.IO.FileMode.Create);


append
----------
C#
FileStream writer = new FileStream(this.LocalDirectory + "\\" +"A"+file.Name, FileMode.Append, FileAccess.Write);



reagards,
Prabu
Posted
Updated 15-Nov-11 23:08pm
v2
Comments
Mehdi Gholam 16-Nov-11 5:09am    
EDIT -> fixed formatting

Well, you're appending to a different file with an 'A' in front of it. Why would you append anyway?
 
Share this answer
 
Comments
prabut 16-Nov-11 6:08am    
Yes,i put before that because it causes errors while appending same file name.
Is it all about downloading of the file which was partially downloaded before downloading was interrupted? You are doing it wrong. Please refer to my application HttpDownloader which I shared on CodeProject: how to download a file from internet[^].

It does it all; I provided complete source code of the application.

—SA
 
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