File Copy
In this chapter you will learn:
Copying A File by using FileInfo
using System;//j a v a 2s.co m
using System.IO;
public class MainClass
{
static void Main(string[] args)
{
FileInfo MyFile = new FileInfo(@"c:\Projects\Testing.txt");
MyFile.Create();
MyFile.CopyTo(@"c:\Folder\Testing.txt");
//or
MyFile.CopyTo(@"c:\Folder\Testing.txt", true);
}
}
Next chapter...
What you will learn in the next chapter: