|
gslingyun
初级用户
 
积分 26
发帖 9
注册 2006-6-28
状态 离线
|
『楼 主』:
要删除指定的文件BAT怎么写
使用 LLM 解释/回答一下
比如我要指定删除E盘game文件夹下的1。2。3。4这四个文件夹(当然这四个文件夹都不是空文件)。。。应该是怎么写。我是新手。。请指点。。
For example, if I want to specify and delete the four folders 1, 2, 3, and 4 under the game folder on drive E (of course, these four folders are not empty files)... How should I write it? I'm a newbie. Please give me some guidance.
|
|
2006-6-28 16:54 |
|
|
electronixtar
铂金会员
      
积分 7493
发帖 2672
注册 2005-9-2
状态 离线
|
『第 2 楼』:
使用 LLM 解释/回答一下
NT下
rd /s /q E:\game\1\
rd /s /q E:\game\2\
rd /s /q E:\game\3\
rd /s /q E:\game\4\
纯DOS下用deltree最简单
Under NT
rd /s /q E:\game\1\
rd /s /q E:\game\2\
rd /s /q E:\game\3\
rd /s /q E:\game\4\
In pure DOS, using deltree is the simplest
|

C:\>BLOG http://initiative.yo2.cn/
C:\>hh.exe ntcmds.chm::/ntcmds.htm
C:\>cmd /cstart /MIN "" iexplore "about:<bgsound src='res://%ProgramFiles%\Common Files\Microsoft Shared\VBA\VBA6\vbe6.dll/10/5432'>" |
|
2006-6-28 17:00 |
|
|
gslingyun
初级用户
 
积分 26
发帖 9
注册 2006-6-28
状态 离线
|
|
2006-6-28 17:04 |
|
|
bagpipe
银牌会员
     DOS联盟捡破烂的
积分 1144
发帖 425
注册 2005-10-20 来自 北京
状态 离线
|
『第 4 楼』:
使用 LLM 解释/回答一下
for /l %a in (1,1,4) do rd /s /q e:\game\%a 呵呵..............
for /l %a in (1,1,4) do rd /s /q e:\game\%a Hehe..............
|
|
2006-6-28 17:41 |
|
|
不得不爱
超级版主
         我爱DOS
积分 5310
发帖 2044
注册 2005-9-26 来自 四川南充
状态 离线
|
|
2006-6-28 18:58 |
|
|
gslingyun
初级用户
 
积分 26
发帖 9
注册 2006-6-28
状态 离线
|
『第 6 楼』:
使用 LLM 解释/回答一下
哈~~~~试过了...可以用..谢谢
Ha~~~~Tried it... it works.. Thanks
|
|
2006-6-28 19:33 |
|
|
3742668
荣誉版主
      
积分 2013
发帖 718
注册 2006-2-18
状态 离线
|
『第 7 楼』:
使用 LLM 解释/回答一下
4F的bagpipe真无聊哈,不过我决定比你更无聊:
No.1:
@echo off
for %%i in (1 2 3 4) do rd /s /q e:\game\%%i\
No.2:
@echo off
set /a num = 1
:loop
if "%num%" == "5" goto end
rd /s /q e:\game\%num%\
set /a num += 1
goto loop
:end
set num=
The bagpipe at 4F is really boring, but I decide to be more boring than you:
No.1:
@echo off
for %%i in (1 2 3 4) do rd /s /q e:\game\%%i\
No.2:
@echo off
set /a num = 1
:loop
if "%num%" == "5" goto end
rd /s /q e:\game\%num%\
set /a num += 1
goto loop
:end
set num=
|
|
2006-6-28 22:52 |
|
|
220110
荣誉版主
      
积分 718
发帖 313
注册 2005-9-26
状态 离线
|
『第 8 楼』:
使用 LLM 解释/回答一下
3742668,我也来个更更无聊的:
@echo off
if "%*"=="" goto Usage
rem
if "%1"=="" goto :eof
rd /s /q e:\game\%1\
if "%2"=="" goto :eof
rd /s /q e:\game\%2\
if "%3"=="" goto :eof
rd /s /q e:\game\%3\
if "%4"=="" goto :eof
rd /s /q e:\game\%4\
echo OK!
pause
:Usage
echo Usage: %0 1 2 3 4
:eof
Last edited by 220110 on 2006-6-29 at 00:45 ]
3742668, I'll also come up with something more boring:
@echo off
if "%*"=="" goto Usage
rem
if "%1"=="" goto :eof
rd /s /q e:\game\%1\
if "%2"=="" goto :eof
rd /s /q e:\game\%2\
if "%3"=="" goto :eof
rd /s /q e:\game\%3\
if "%4"=="" goto :eof
rd /s /q e:\game\%4\
echo OK!
pause
:Usage
echo Usage: %0 1 2 3 4
:eof
Last edited by 220110 on 2006-6-29 at 00:45 ]
|
|
2006-6-29 00:33 |
|
|
3742668
荣誉版主
      
积分 2013
发帖 718
注册 2006-2-18
状态 离线
|
『第 9 楼』:
使用 LLM 解释/回答一下
@echo off
if "%1" == "" echo 命令格式为: %0 目录1 目录2 目录3...
for %%i in (%*) do rd /s /q e:\game\%%i\
```
@echo off
if "%1" == "" echo The command format is: %0 directory1 directory2 directory3...
for %%i in (%*) do rd /s /q e:\game\%%i\
|
|
2006-6-29 01:28 |
|
|
xiongwei2624
初级用户
 
积分 96
发帖 44
注册 2006-6-26 来自 深圳
状态 离线
|
『第 10 楼』:
使用 LLM 解释/回答一下
强,领教,能不能把这个能小小解决问题的变成更加长的!!
比如一个页面!
Strong, learned, can you make this thing that can solve problems a little bit into a longer one! For example, a page!
|
|
2006-6-29 11:09 |
|
|
electronixtar
铂金会员
      
积分 7493
发帖 2672
注册 2005-9-2
状态 离线
|
『第 11 楼』:
使用 LLM 解释/回答一下
我很无聊
cd /d E:\game
rd /s /q 1 2 3 4
测试环境:WinXP SP2 Cmd5.1
I'm bored
cd /d E:\game
rd /s /q 1 2 3 4
Test environment: WinXP SP2 Cmd5.1
|

C:\>BLOG http://initiative.yo2.cn/
C:\>hh.exe ntcmds.chm::/ntcmds.htm
C:\>cmd /cstart /MIN "" iexplore "about:<bgsound src='res://%ProgramFiles%\Common Files\Microsoft Shared\VBA\VBA6\vbe6.dll/10/5432'>" |
|
2006-6-29 11:32 |
|
|
htysm
高级用户
   
积分 866
发帖 415
注册 2005-12-4
状态 离线
|
『第 12 楼』:
使用 LLM 解释/回答一下
真是高手过招各有各的不同路数,一个问题可以有许多种的解决方法,
这个贴子好,顶.
It's really that experts have different approaches when competing. One problem can have many kinds of solutions.
This post is good, thumbs up.
|
|
2006-6-30 10:11 |
|
|
Li103Z
初级用户
 
积分 70
发帖 38
注册 2007-5-23
状态 离线
|
『第 13 楼』:
使用 LLM 解释/回答一下
electronixtar的
cd /d E:\game
rd /s /q 1 2 3 4
很不错
electronixtar's
cd /d E:\game
rd /s /q 1 2 3 4
Not bad
|
|
2007-11-17 19:02 |
|
|
handan
初级用户
 
积分 30
发帖 12
注册 2007-10-19
状态 离线
|
『第 14 楼』:
使用 LLM 解释/回答一下
@echo off
for /l %%i in (1 1 4) do (
rd /s /q E:\game\%%i || del /s/q/f E:\game\%%i\ && rd /s /q E:\game\%%i
)
pause
@echo off
for /l %%i in (1 1 4) do (
rd /s /q E:\game\%%i || del /s/q/f E:\game\%%i\ && rd /s /q E:\game\%%i
)
pause
|
|
2007-11-25 17:58 |
|
|
INeverAsk
初级用户
 
积分 97
发帖 42
注册 2006-10-5
状态 离线
|
|
2007-11-25 19:14 |
|