using System; using System.Collections.Generic; using System.Linq; using System.Text; namespace ConsoleApplication1 { class Program { static void Main(string[] args) { string hoge = "./hoge.txt"; string hage = "./hage.txt"; //Console.Write("Start " + hoge + " MoveTo" + hoge + ".wk"); //Console.ReadLine(); System.IO.FileInfo f1 = new System.IO.FileInfo(hoge); f1.MoveTo(hoge + ".wk"); //Console.Write("Start " + hage + " MoveTo" + hoge); //Console.ReadLine(); // while (true) // if (System.IO.File.Exists(hoge) == false) break; System.IO.FileInfo f2 = new System.IO.FileInfo(hage); f2.MoveTo(hoge); //Console.Write("Delete " + hoge + ".wk"); //Console.ReadLine(); System.IO.FileInfo f3 = new System.IO.FileInfo(hoge + ".wk"); f3.Delete(); Console.Write("Exit"); Console.ReadLine(); } } }