System.IO.Directory.Exists()関数を利用します。 指定ディレクトリ(フォルダ)が存在するか否かを調べ 結果の真偽値を得ます。C#
if ( System.IO.Directory.Exists(@"c:\HP") ) MessageBox.Show( "あったよママン!" ); else MessageBox.Show( "ないよぉ orz" );VB.NET
If System.IO.Directory.Exists("c:\HP") Then MessageBox.Show("あったよママン!") Else MessageBox.Show("ないよぉ orz") End IfVC.NET
if ( System::IO::Directory::Exists("c:\\HP") ) MessageBox::Show( "あったよママン!" ); else MessageBox::Show( "ないよぉ orz" );
SEO | [PR] 爆速!無料ブログ 無料ホームページ開設 無料ライブ放送 | ||