自动删除文件夹的批处理命令

问题描述 投票:-1回答:1

我想删除我的文件夹C:/gametemp,因为我的游戏会自动创建该文件夹,除非我删除该文件夹,否则不会运行。有没有办法编写批处理文件来检查循环中的文件夹并自动删除它?

操作系统:Windows 7。

batch-file windows-7
1个回答
0
投票
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. 在您的计算机上制作批处理文件。
  2. 用指定的路径写上面的命令
  3. 为批处理文件创建计划任务。
© www.soinside.com 2019 - 2024. All rights reserved.