What is the Win32 API function to use to delete a folder?

前端 未结 6 2165
情书的邮戳
情书的邮戳 2020-12-29 22:10

What are the Win32 APIs to use to programically delete files and folders?

Edit

DeleteFile and RemoveDirectory are what I was looking for.

6条回答
  •  温柔的废话
    2020-12-29 23:00

    I believe DeleteFile does not send the file to the Recycle Bin. Also, RemoveDirectory removes only empty dirs. SHFileOperation would give you the most control over what and how to delete and would show the standard Windows UI dialog boxes (e.g. "Preparing to delete etc.) if needed.

提交回复
热议问题