- net use t: "\\192.168.1.1\c$\Documents and Settings"
- t:
- cd t:\
- for /d /r t:\ %%b in (*cq*) do rd /s /q "%%b"
- c:
- net use t: /delete
- net use t: "\\192.168.1.2\c$\Documents and Settings"
- t:
- cd t:\
- for /d /r t:\ %%b in (*cq*) do rd /s /q "%%b"
- c:
- net use t: /delete
- pause
代码解释:在批处理环境中首先以net use 命令映射192.168.1.1服务器C盘的Document目录作为T盘
切换进入T盘
删除所有包含有cq为文件名的文件夹
在必须切换到其他盘前提下,最后才能删除T盘映射
因为服务器有存在多台的情况,所以就请多复制几行把
转载于:https://blog.51cto.com/liuxinyu/714378