0
我是cmd的新手,這是我使用該程序編寫的第一個代碼。這部分代碼我沒有自己寫過。如何使用cmd刪除目錄
我的問題是,我試圖刪除使用CMD的文件夾,但我無法讓它工作。
我使用這個命令:
RM /S /Q "directory"
在這段代碼
cls
@ECHO OFF
color 02
title ija4779fc
if EXIST "Control Panel.{21EC2020-3AEA-1069-A2DD-08002B30309D}" goto UNLOCK
if NOT EXIST MyFolder(2) goto MDMyFolder(2)
:CONFIRM
echo Are you sure to lock this folder? (Y/N)
set/p "cho=>"
if %cho%==Y goto LOCK
if %cho%==y goto LOCK
if %cho%==n goto END
if %cho%==N goto END
echo THIS IS NOT AN OPTION.
goto CONFIRM
:LOCK
ren MyFolder(2) "Control Panel.{21EC2020-3AEA-1069-A2DD-08002B30309D}"
attrib +h +s "Control Panel.{21EC2020-3AEA-1069-A2DD-08002B30309D}"
echo Folder locked
goto UNLOCK
:UNLOCK
echo ENTER PASSWORD:
set/p "pass=>"
if NOT %pass%== ija4779fc goto FAIL
attrib -h -s "Control Panel.{21EC2020-3AEA-1069-A2DD-08002B30309D}"
ren "Control Panel.{21EC2020-3AEA-1069-A2DD-08002B30309D}" MyFolder
echo UNLOCKED
goto PAUSE
:FAIL
Color 04
echo INCORRECT PASSWORD
DEL /S /Q "MyFolder(2)"
echo S
echo FILES DELETED
echo SYSTEM SHUTDOWN
goto end
:CORRECT
echo
:PAUSE
PAUSE
:MDMYFOLDER(2)
:END
end
MD Myfolder(2)
日Thnx的幫助。
謝謝! :)它幫助了很多。 – Tuller45