就是给定路径名
比如:c:\文件
就在c盘上建一个“文件”的文件夹
我能在这个文件夹里面放一些文件
请问应该如何实现?
谢谢

解决方案 »

  1.   

    if ( !CreateDirectory(filePath, NULL) )
    {
    AfxMessageBox("不能创建目录");
    return;
    }
    就可以创建目录了。filePath就是目录路径
      

  2.   

    CreateDirectory
    The CreateDirectory function creates a new directory. If the underlying file system supports security on files and directories, the function applies a specified security descriptor to the new directory. To specify a template directory, use the CreateDirectoryEx function.BOOL CreateDirectory(
      LPCTSTR lpPathName,                         // directory name
      LPSECURITY_ATTRIBUTES lpSecurityAttributes  // SD
    );