Working With Directories

using namespace System::IO; Does directory exist? (Note paths can include a filename if you wish) if (!Directory::Exists(Path::GetDirectoryName(MyFileName))) //or String ^path; path = "C:\\Atest\\"; // '\\'='\' if (!Directory::Exists(path)) //or if (!Directory::Exists("C:\\Atest\\")) // '\\'='\' Create Directory (Note paths can include a filename if you wish) Directory::CreateDirectory(Path::GetDirectoryName(MyFileName)); //or String ^path; path = "C:\\Atest\\"; // '\\'='\' Directory::CreateDirectory(path); //or Directory::CreateDirectory("C:\\Atest\\"); […]

Read More