日時: 2009/02/21 20:00 名前: lightbox
http://msdn.microsoft.com/ja-jp/library/system.io.aspx
拡張子:
// プロジェクトディレクトリ作成
String targetRoot = this.出力場所.Text + @"\" + this.プロジェクト.Text;
String target = targetRoot + @"\excel_out";
if (Directory.Exists(target)) {
MessageBox.Show("プロジェクトが既に存在します ");
return;
}
// 途中のディレクトリも作成される
Directory.CreateDirectory(target);
String str;
// PHP 用
if (this.PHP.Checked) {
// excel_out.php
str = @"\excel_out.php";
File.Copy(exeDir + @"\sk" + str, targetRoot + str);
// book.php
str = @"\book.php";
File.Copy(exeDir + @"\sk" + str, targetRoot + str);
// filelist.xml
str = @"\filelist.xml";
File.Copy(exeDir + @"\sk\excel_out" + str, target + str);
// sheet.php
str = @"\sheet.php";
File.Copy(exeDir + @"\sk\excel_out" + str, target + str);
// stylesheet.css
str = @"\stylesheet.css";
File.Copy(exeDir + @"\sk\excel_out" + str, target + str);
}
// ASP 用
if (this.ASP.Checked) {
// excel_out.php
str = @"\excel_out.asp";
File.Copy(exeDir + @"\sk" + str, targetRoot + str);
// book.php
str = @"\book.inc";
File.Copy(exeDir + @"\sk" + str, targetRoot + str);
// filelist.xml
str = @"\filelist.xml";
File.Copy(exeDir + @"\sk\excel_out" + str, target + str);
// sheet.php
str = @"\sheet.asp";
File.Copy(exeDir + @"\sk\excel_out" + str, target + str);
// stylesheet.css
str = @"\stylesheet.css";
File.Copy(exeDir + @"\sk\excel_out" + str, target + str);
}
|