Article ID: 914355 - Last Review: December 6, 2006 - Revision: 1.4 How to use the My.Computer.Network object to download and upload files in Visual Basic 2005On This PageSUMMARYLearn about how to use the My.Computer.Network object and its methods to download and upload files across a network in Microsoft Visual Basic 2005. This article contains sample
steps and sample code that demonstrate how to use the My.Computer.Network object for these tasks. INTRODUCTIONThis article describes how to use the My.Computer.Network object to upload and download files across a network in Visual Basic 2005. By using this object, you can transfer files from a local computer to a remote network resource. Additionally, you can transfer files from a remote network resource to a local computer. To do this, use the following
methods in a Visual Basic 2005 application:
MORE INFORMATIONThe following sample steps and sample code demonstrate how
to use the My.Computer.Network object to download and upload files in Visual Basic 2005. For
more information about these methods, such as information about exceptions that may be thrown and
about parameter options, see the "References" section. Note Before you follow these examples, make sure that the following conditions are true:
Use the My.Computer.Network.DownloadFile method to download a fileThis step-by-step example illustrates how to download a file from a remote network resource and then save the file to a local computer by using the My.Computer.Network.DownloadFile method. To do this, follow these steps:
Use the My.Computer.Network.UploadFile method to upload a fileThis step-by-step example illustrates how to upload a file from a local computer to a remote network resource by using the My.Computer.Network.UploadFile method. To do this, follow these steps:
REFERENCESFor more information about the My.Computer.Network object, visit the following Microsoft Developer Network (MSDN)
Web site: http://msdn2.microsoft.com/en-us/library/182d4ety(vs.80).aspx
(http://msdn2.microsoft.com/en-us/library/182d4ety(vs.80).aspx)
For more information about the My.Computer.Network.DownloadFile method, visit the following Microsoft Developer Network (MSDN)
Web site: http://msdn2.microsoft.com/en-us/library/1say4ws7(VS.80).aspx
(http://msdn2.microsoft.com/en-us/library/1say4ws7(VS.80).aspx)
For more information about the My.Computer.Network.UploadFile method, visit the following Microsoft Developer Network (MSDN)
Web site: http://msdn2.microsoft.com/en-us/library/w3kksch7(VS.80).aspx
(http://msdn2.microsoft.com/en-us/library/w3kksch7(VS.80).aspx)
| Article Translations
|

Back to the top
