string path = System.Environment.GetFolderPath(Environment.SpecialFolder.ApplicationData) + "\\xxxx\\yyyyy";
           
            if (!Directory.Exists(path))
            {
                Directory.CreateDirectory(path);
            }

            string guestName = "Guest.dat";
            string localDB = "LocalPhoneBook.dat";
            string srcPath = "";

            if (!File.Exists(path + "\\" + guestName))
            {
                srcPath = "./" + guestName;
                File.Copy(srcPath, path + "\\" + guestName);
            }

            if (!File.Exists(path + "\\" + localDB))
            {
                srcPath = "./" + localDB;

                File.Copy(srcPath, path + "\\" + localDB);
            }

이 글은 스프링노트에서 작성되었습니다.

by 무위자연 2008. 11. 26. 17:14