I need help copying to a specific drive in .Net

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
mainrotorAsked:
Who is Participating?

Improve company productivity with a Business Account.Sign Up

x
 
CodeCruiserConnect With a Mentor Commented:
Try

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

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.