How to move file in C#

1 Answer

0 votes
using System;
using System.IO;

namespace Move_File
{
    class Program
    {
        static void Main(string[] args)
        {
            File.Move("d:\\test.txt", "d:\\development\\test.txt");
            
            // Move & Rename
            //File.Move("d:\\test.txt", "d:\\development\\test_new_name.txt"); 
        }
    }
}



answered Sep 6, 2014 by avibootz
edited Sep 7, 2014 by avibootz
...