1
我需要刪除以特定字符串「user」開頭的目錄,我也需要刪除目錄中的所有子文件夾。 我使用removedirectory,只有當它是空的時才刪除目錄。如何遞歸刪除以「xxxxx」開頭的目錄?
我需要刪除以特定字符串「user」開頭的目錄,我也需要刪除目錄中的所有子文件夾。 我使用removedirectory,只有當它是空的時才刪除目錄。如何遞歸刪除以「xxxxx」開頭的目錄?
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.