// DirectorySetAttributes.cpp : メイン プロジェクト ファイルです。 #include "stdafx.h" using namespace System; using namespace System::IO; int main(array ^args) { String^ path = "C:\\MyFolder\\Homepage\\public_html\\Cprpr\\SetAttributesDirectory"; File::SetAttributes(path, static_cast(File::GetAttributes(path) | FileAttributes::Hidden)); Console::WriteLine("The {0} file is now hidden.", path); return 0; }