急!急!急!目录建立 各位大虾,小弟请问如何在当前目录下建立一个自己的文件夹,用完后有如何删除? 解决方案 » 免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货 CreateDirectory(...)建立目录DeleteFile(...)删除目录、文件 SECURITY_ATTRIBUTES lp; lp.nLength =sizeof(SECURITY_ATTRIBUTES); lp.lpSecurityDescriptor=NULL; lp.bInheritHandle =FALSE; CreateDirectory( "c:\\aa",&lp); 删除文件夹RemoveDirectoryThe RemoveDirectory function deletes an existing empty directory. BOOL RemoveDirectory( LPCTSTR lpPathName // directory name); 如果要删除非空的文件夹需要用下面shell代码:LPSHFILEOPSTRUCT lp;lp=new SHFILEOPSTRUCT;lp->hwnd=m_hWnd;lp->pFrom=(LPCSTR)"C:\\TC08A32";lp->pTo=(LPCSTR)"E:\\zhaoxm"; //lp->lpszProgressTitle="*.*";lp->wFunc=FO_DELETE ;lp->fFlags=FOF_NOCONFIRMATION |FOF_FILESONLY ;SHFileOperation(lp);delete lp; SHCreateDirectoryEx(......);CreateDirectory(....);_mkdir(...); CreateDirectory(...)建立目录DeleteFile(...)删除目录、文件 char tPath[256];GetCurrentDirectory(tPath,256); //取得當前目錄_mkdir(_rmdir( WriteFile这个API函数可以向文件中间写入数据吗? 菜鸟求教c++的开发工具问题~ BCG向导在.net2003中的问题 界面中年月日的编写问题 现无英语四级证书,今后可否获得上海户口? CMSComm控件读写问题 帮忙看看是什么问题。 关于dll的问题 如何在excel里插入一行!!请高手指点!! 实际地理坐标转换成屏幕坐标? 程序在运行完所有的语句后,在运行最后一个括号时发生错误,不能正常结束,请问这一般是十么原因? 视图中 OnPaint和OnDraw之间的关系?
DeleteFile(...)删除目录、文件
lp.nLength =sizeof(SECURITY_ATTRIBUTES);
lp.lpSecurityDescriptor=NULL;
lp.bInheritHandle =FALSE;
CreateDirectory( "c:\\aa",&lp);
删除文件夹
RemoveDirectory
The RemoveDirectory function deletes an existing empty directory. BOOL RemoveDirectory(
LPCTSTR lpPathName // directory name
);
LPSHFILEOPSTRUCT lp;
lp=new SHFILEOPSTRUCT;
lp->hwnd=m_hWnd;
lp->pFrom=(LPCSTR)"C:\\TC08A32";
lp->pTo=(LPCSTR)"E:\\zhaoxm";
//lp->lpszProgressTitle="*.*";
lp->wFunc=FO_DELETE ;
lp->fFlags=FOF_NOCONFIRMATION |FOF_FILESONLY ;
SHFileOperation(lp);
delete lp;
CreateDirectory(....);
_mkdir(...);
DeleteFile(...)删除目录、文件
GetCurrentDirectory(tPath,256); //取得當前目錄
_mkdir(
_rmdir(