Go Premium for a chance to win a PS4. Enter to Win

x
?
Solved

I need help copying to a specific drive in .Net

Posted on 2014-02-24
1
Medium Priority
?
193 Views
Last Modified: 2014-02-24
Hi Experts,
In VB.Net, how do i copy to a specific drive on a specific server.  Say my server name is TEST server, but I want to copy a file to a specific folder in the D drive.  How could I do this?
Would I do something like this:

                Dim destination As String = System.IO.Path.Combine("\\TEST\D:\TESTFolder\", filename)
                System.IO.File.Copy(source, destination, True)

Open in new window


Thank you very much in advance,
mrotor
0
Comment
Question by:mainrotor
1 Comment
 
LVL 83

Accepted Solution

by:
CodeCruiser earned 2000 total points
ID: 39883911
Try

Dim destination As String = System.IO.Path.Combine("\\TEST\D$\TESTFolder\", filename)
                System.IO.File.Copy(source, destination, True)
0

Featured Post

Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

This article describes relatively difficult and non-obvious issues that are likely to arise when creating COM class in Visual Studio and deploying it by professional MSI-authoring tools. It is assumed that the reader is already familiar with the cla…
A long time ago (May 2011), I have written an article showing you how to create a DLL using Visual Studio 2005 to be hosted in SQL Server 2005. That was valid at that time and it is still valid if you are still using these versions. You can still re…
Exchange organizations may use the Journaling Agent of the Transport Service to archive messages going through Exchange. However, if the Transport Service is integrated with some email content management application (such as an anti-spam), the admin…
How to fix incompatible JVM issue while installing Eclipse While installing Eclipse in windows, got one error like above and unable to proceed with the installation. This video describes how to successfully install Eclipse. How to solve incompa…
Suggested Courses

963 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question