Programing

Windows에서 박쥐 파일을 사용하여 모든 내용이 들어있는 폴더를 삭제하는 방법은 무엇입니까?

crosscheck 2020. 7. 11. 10:04
반응형

Windows에서 박쥐 파일을 사용하여 모든 내용이 들어있는 폴더를 삭제하는 방법은 무엇입니까?


bat 파일을 사용하여 모든 파일과 하위 폴더가있는 폴더를 삭제하고 싶습니다.

다음을 시도했지만 작동하지 않습니다.

@DEL D:\PHP_Projects\testproject\Release\testfolder*.*

아무도 도와 줄 수 있습니까?


@RD /S /Q "D:\PHP_Projects\testproject\Release\testfolder"

설명 :

디렉토리를 제거 (삭제)합니다.

RMDIR [/S] [/Q] [drive:]path RD [/S] [/Q] [drive:]path

/S      Removes all directories and files in the specified directory
        in addition to the directory itself.  Used to remove a directory
        tree.

/Q      Quiet mode, do not ask if ok to remove a directory tree with /S

  1. del /s /q c:\where ever the file is\*
  2. rmdir /s /q c:\where ever the file is\
  3. mkdir c:\where ever the file is\

del / s / qc : \ 파일이있는 위치 *

폴더와 하위 폴더의 모든 파일이 삭제되지만 빈 하위 폴더는 그대로 유지됩니다.

참고 URL : https://stackoverflow.com/questions/7331056/how-to-delete-a-folder-with-all-contents-using-a-bat-file-in-windows

반응형