1

我需要删除以特定字符串“用户”开头的目录,并且我还需要删除目录中的所有子文件夹。我使用了 removedirectory ,它仅在目录为空时才删除目录。

4

1 回答 1

0
    Normally I would open a command window then cd to the directory you want to delete,
    Enter the command: "del /S /F *.* *" to delete all files and subdirectories.
    Backup to the parent directory: cd ..
    Remove the directory: rmdir "user*"

    Use "del/?" to see all the options for del.

    If you have to do this in c++, you can use the "system()" call.

    BTW: I did not test this just now, so no guarantee.
于 2013-01-03T08:14:00.357 回答