1
Answer

Copy a file from the given path

Photo of darma teja

darma teja

12y
1k
1
Hi,

I have a path like this: C:\Vulpes\xyz.xml

I wanted to copy given path file into a folder in h:\darma\

Give me some ideas to do

Darma

Answers (1)

0
Photo of Vulpes
NA 98.3k 1.5m 12y
This should do it:

      string sourcePath = @"C:\Vulpes\xyz.xml";
      string destPath =  @"h:\darma\" + Path.GetFileName(sourcePath);
      System.IO.File.Copy(sourcePath, destPath);
Accepted