此批处理命令将删除目录,但是目录必须为空才能删除。
rd [directoryname]
以下示例显示了 rd 命令的不同变体。
@echo off Rem removes the directory called newdir rd C:\newdir Rem removes 2 directories rd Dir1 Dir2 Rem Removes directory with spaces rd "Application A" Rem Removes the directory Dir1 including all the files and subdirectories in it rd /s Dir1 Rem Removes the directory Dir1 including all the files and subdirectories in it but asks for a user confirmation first. rd /q /s Dir1
所有操作均按照批处理文件中的备注执行。
这一章《批处理 - 命令 - RD 函数》你学到了什么?在下面做个笔记吧!做站不易,你的分享是对我们最大的支持,感谢!😊
Tony Bai · Go语言第一课 -〔Tony Bai - 56讲〕