Re: [DOTNET] Copying files from http:// to Local Drive
by Rahul Sharma other posts by this author
Nov 23 2001 4:06PM messages near this date
Re: [DOTNET] Copying files from http:// to Local Drive
|
Re: [DOTNET] Copying files from http:// to Local Drive
Hi There,
If I'm not getting you wrong then you have to create the Directory
Structure by yourself on the local system because as the name suggests,
"DownloadFile" method is only meant to fetch a file from the requested
uri (in uri you provide the fullpath filename) in a non-recursive
manner.
So in case if you are providing a directory path as uri, then in the
target file you will get all the files available in the uri directory,
in the case of a nested directory too.
Hope this helps you -:)
Rahul.
THONA-CONSULTING
-----Original Message-----
From: vivek bhardwaj [mailto:vbhardwaj@[...].DE]
Sent: Freitag, 23. November 2001 16:44
To: DOTNET@[...].COM
Subject: Re: [DOTNET] Copying files from http:// to Local Drive
i would once again like to have ur attention towards the old topic:
The problem now i am facing is that when i am copying a directory from
http
to local disk its not adding the directory as a node its just treatin it
as
a file. What i mean to say is that it works only fine for files although
It
gets the data of the directory but shows it as a file on hard disk.
If i am wrong please help.
Thanks
-----Original Message-----
From: dotnet discussion [mailto:DOTNET@[...].COM]On Behalf Of
Rahul Sharma
Sent: Friday, 23 November 2001 2:34 PM
To: DOTNET@[...].COM
Subject: Re: [DOTNET] Copying files from http:// to Local Drive
Hi Vivek,
Just try with WebClient.DownloadFile(string uri-address, string
FileNameToDownLoad) ;
Hope this helps youo -:)
Rahul.
-----Original Message-----
From: vivek bhardwaj [mailto:vbhardwaj@[...].DE]
Sent: Freitag, 23. November 2001 14:20
To: DOTNET@[...].COM
Subject: Re: [DOTNET] Copying files from http:// to Local Drive
I just want to know how to do it with c#. I just have an idea like this
and
right now i am working with that:
create an instance of httpwebrequest:
HttpWebReuest web = (HttpWebRequest)WebREquestFActory.Create("http://
filename");
HttpWebResPonse webRes = (HttpWebResponse)web.getREsponse();
Open a StreamReader or BinaryReader
and copy contents into the buffer and copy that buffer into the hard
disk.
Can u gimme some idea about this
Thanks
-----Original Message-----
From: dotnet discussion [mailto:DOTNET@[...].COM]On Behalf Of
Slavomir Furman
Sent: Friday, 23 November 2001 2:10 PM
To: DOTNET@[...].COM
Subject: Re: [DOTNET] Copying files from http:// to Local Drive
Hello!
<VivekB wrote>
can somebody help me about copying files from http:// to local drive
(c:/)
</VivekB wrote>
And exactly what problem you have with this?
If file is exposed via web server, then just click on the link by right
mouse button and
choose "SaveAs".
If you want to see exact filestructure of directories and files in
filesytem, or if you want
to see content of server-side scripts within say .ASP or .APSX files, on
your web
server machine, then you should have "file share" or "ftp" or other
similar
access
(with appropriate rights) on that files.
hth,
Slavo.
-----Original Message-----
From: vivek bhardwaj [mailto:vbhardwaj@[...].DE]
Sent: Friday, November 23, 2001 2:03 PM
To: DOTNET@[...].COM
Subject: [DOTNET] Copying files from http:// to Local Drive
can somebody help me about copying files from http:// to local drive
(c:/)
shall be thankful.
Vivek
You can read messages from the DOTNET archive, unsubscribe from DOTNET,
or
subscribe to other DevelopMentor lists at http://discuss.develop.com.
You can read messages from the DOTNET archive, unsubscribe from DOTNET,
or
subscribe to other DevelopMentor lists at http://discuss.develop.com.
You can read messages from the DOTNET archive, unsubscribe from DOTNET,
or
subscribe to other DevelopMentor lists at http://discuss.develop.com.
You can read messages from the DOTNET archive, unsubscribe from DOTNET,
or
subscribe to other DevelopMentor lists at http://discuss.develop.com.
You can read messages from the DOTNET archive, unsubscribe from DOTNET,
or
subscribe to other DevelopMentor lists at http://discuss.develop.com.
You can read messages from the DOTNET archive, unsubscribe from DOTNET, or
subscribe to other DevelopMentor lists at http://discuss.develop.com.
|