Solved

I need help copying to a specific drive in .Net

Posted on 2014-02-24
1
182 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 500 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

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

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

Suggested Solutions

It was really hard time for me to get the understanding of Delegates in C#. I went through many websites and articles but I found them very clumsy. After going through those sites, I noted down the points in a easy way so here I am sharing that unde…
If you need to start windows update installation remotely or as a scheduled task you will find this very helpful.
This Micro Tutorial hows how you can integrate  Mac OSX to a Windows Active Directory Domain. Apple has made it easy to allow users to bind their macs to a windows domain with relative ease. The following video show how to bind OSX Mavericks to …
In this video I am going to show you how to back up and restore Office 365 mailboxes using CodeTwo Backup for Office 365. Learn more about the tool used in this video here: http://www.codetwo.com/backup-for-office-365/ (http://www.codetwo.com/ba…

920 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

Need Help in Real-Time?

Connect with top rated Experts

16 Experts available now in Live!

Get 1:1 Help Now