Solved

I need help copying to a specific drive in .Net

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

Find Ransomware Secrets With All-Source Analysis

Ransomware has become a major concern for organizations; its prevalence has grown due to past successes achieved by threat actors. While each ransomware variant is different, we’ve seen some common tactics and trends used among the authors of the malware.

Join & Write a Comment

Suggested Solutions

More often than not, we developers are confronted with a need: a need to make some kind of magic happen via code. Whether it is for a client, for the boss, or for our own personal projects, the need must be satisfied. Most of the time, the Framework…
Today I had a very interesting conundrum that had to get solved quickly. Needless to say, it wasn't resolved quickly because when we needed it we were very rushed, but as soon as the conference call was over and I took a step back I saw the correct …
Internet Business Fax to Email Made Easy - With eFax Corporate (http://www.enterprise.efax.com), you'll receive a dedicated online fax number, which is used the same way as a typical analog fax number. You'll receive secure faxes in your email, fr…
Access reports are powerful and flexible. Learn how to create a query and then a grouped report using the wizard. Modify the report design after the wizard is done to make it look better. There will be another video to explain how to put the final p…

760 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

20 Experts available now in Live!

Get 1:1 Help Now