gpt4 book ai didi

batch-file - 批处理文件不在静音模式 del/s/q/f 文件

转载 作者:行者123 更新时间:2023-12-03 20:51:08 25 4
gpt4 key购买 nike

当我在 cmd 中或作为批处理文件运行此命令时,它不会像/q 那样以静音模式运行,而是显示“已删除的文件 - 文件”

del /s /q /f file
Delteded file - file

我希望这也能帮助其他人

最佳答案

实际上,安静模式意味着它在删除时不会要求您确认:

/Q Quiet mode, do not ask if ok to delete on global wildcard


>del /?
Deletes one or more files.

DEL [/P] [/F] [/S] [/Q] [/A[[:]attributes]] names
ERASE [/P] [/F] [/S] [/Q] [/A[[:]attributes]] names

names Specifies a list of one or more files or directories.
Wildcards may be used to delete multiple files. If a
directory is specified, all files within the directory
will be deleted.

/P Prompts for confirmation before deleting each file.
/F Force deleting of read-only files.
/S Delete specified files from all subdirectories.
/Q Quiet mode, do not ask if ok to delete on global wildcard
/A Selects files to delete based on attributes
attributes R Read-only files S System files
H Hidden files A Files ready for archiving
I Not content indexed Files L Reparse Points

为了不显示输出,您必须将其重定向到 NUL。来自 Batch How To … Display & Redirect Output :
del /s /q /f file > NUL

关于batch-file - 批处理文件不在静音模式 del/s/q/f 文件,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/24276281/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com