Click here to Skip to main content
15,884,388 members
Please Sign up or sign in to vote.
1.00/5 (1 vote)
See more:
I have this application (Winform) where in I need to download a file using the file path saved on the database . I tried googling but I really don't know where to start.

Example:
------------------------------
ID:1
Filepath: host/test.txt
------------------------------
[BUTTON]



When I click the button, I want to download the file (from a file server) to a specific folder using a client PC?

I really need it badly. Any links? or tutorials?
THANKS IN ADVANCE! :)
Posted
Updated 15-Oct-14 19:03pm
v2
Comments
Sergey Alexandrovich Kryukov 16-Oct-14 0:18am    
Download from where? What's the protocol? File server? HTTP? FTP? Anything else?
—SA
NekoNao 16-Oct-14 1:02am    
File Server ..

As you mentioned a file server, most likely you mean Windows file sharing service, which can be used in exact same name as any other file system, so you can copy/move/rename/delete files in the same way as any other file, depending on permissions, etc. For file naming, you need to use UNC names:
http://en.wikipedia.org/wiki/Path_%28computing%29#Uniform_Naming_Convention[^].

—SA
 
Share this answer
 
Start here: How to: Download a File in Visual Basic[^]
If you want to download file from ftp server, please follow this link: How to: Download Files with FTP[^]

You can access to the file on server like this:
\\servername\directory\subdirectory\nameoffile
or via mapping:
Z:\nameoffile
where
Z: is equal to \\servername\directory\subdirectory\

Other useful information, you'll find here: How to: Parse File Paths in Visual Basic[^]
Shared folders[^]
 
Share this answer
 
v3

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