【发布时间】:2023-03-25 08:27:01
【问题描述】:
免责声明:(我知道我的标题不是很具描述性。因为我什至不知道错误发生在哪里,所以我没有太多可以放在那里的地方)
所以,我试图编写一个无用的脚本来浪费时间,结果我完全投入其中。它应该制作某种便携式垃圾文件。
代码如下:
@echo off
if not EXIST trash goto create
if EXIST trash goto exists
:create
mkdir trash
goto end
:exists
echo Would you like to delete the files inside of the trash? (y/n)
set /p YESNO=" "
if %YESNO%==n goto end
if %YESNO%==y goto check
:check
echo Please state the correct password
set /p PASSWORD = " "
if %PASSWORD%==1243 del trash\*.* /s /f /q
pause
:end
输入密码后检查就结束了,没有错误信息,也没有删除垃圾文件夹中的文件。
【问题讨论】:
标签: batch-file