|
martin325
银牌会员
    
积分 1582
发帖 603
注册 2006-2-20
状态 离线
|
『楼 主』:
长文件名如何应用于批处理文件中
使用 LLM 解释/回答一下
本人的D盘里有一个文件夹,名称为Temporary Internet Files,现在想做一个在WINXP系统运行的批处理文件,用来删除该文件夹里的所有文件,请问这么长的文件夹名称在批处理文件中如何表达,才不会出错?
请高手指点,谢谢:)
The folder name in your D drive is "Temporary Internet Files". In a batch file running on Windows XP, to refer to this folder correctly, you can use the following way:
```batch
@echo off
del /s /q D:\Temporary^ Internet^ Files\*.*
```
Here, the spaces in the folder name need to be escaped with the caret (^) character so that the batch file can correctly identify the folder path.
|
|
2006-2-22 19:59 |
|
|
llm
元老会员
        
积分 840
发帖 294
注册 2003-9-27
状态 离线
|
『第 2 楼』:
使用 LLM 解释/回答一下
"Temporary Internet Files"
“Temporary Internet Files”
|
|
2006-2-22 22:10 |
|
|
martin325
银牌会员
    
积分 1582
发帖 603
注册 2006-2-20
状态 离线
|
『第 3 楼』:
使用 LLM 解释/回答一下
好的,谢谢
在批处理文件中,DEL 文件时,如何自动回答“yes"作为确认删除命令
Okay, thank you. In a batch file, when deleting files, how to automatically answer "yes" as the confirmation for the delete command
|
|
2006-2-22 22:12 |
|
|
chujiafu
银牌会员
    
积分 1337
发帖 594
注册 2004-5-26 来自 安徽 宿州
状态 离线
|
『第 4 楼』:
使用 LLM 解释/回答一下
试试 echo.|del 你要删除的文件名。
Try echo.|del the file name you want to delete.
|
|
2006-2-23 06:56 |
|
|
martin325
银牌会员
    
积分 1582
发帖 603
注册 2006-2-20
状态 离线
|
『第 5 楼』:
使用 LLM 解释/回答一下
cd\
D:
cd "fggg"
echo.|del "*.*"
按上面的写法,执行批处理后,不行!还是确认删除,按“Y”或“N”才肯继续执行
cd\
D:
cd "fggg"
echo.|del "*.*"
When written as above, after executing the batch processing, it doesn't work! It still asks for confirmation to delete, and you have to press "Y" or "N" to continue executing.
|
|
2006-2-23 08:53 |
|
|
无奈何
荣誉版主
      
积分 1338
发帖 356
注册 2005-7-15
状态 离线
|
『第 6 楼』:
使用 LLM 解释/回答一下
换成下面的语句试试。
echo y|del .
Try replacing it with the following statement.
echo y|del .
|

☆开始\运行 (WIN+R)☆
%ComSpec% /cset,=何奈无── 。何奈可无是原,事奈无做人奈无&for,/l,%i,in,(22,-1,0)do,@call,set/p= %,:~%i,1%<nul&ping/n 1 127.1>nul
|
|
2006-2-23 20:20 |
|
|
martin325
银牌会员
    
积分 1582
发帖 603
注册 2006-2-20
状态 离线
|
『第 7 楼』:
使用 LLM 解释/回答一下
成功了,谢谢6楼的朋友
It worked, thank you friend from floor 6
|
|
2006-2-24 01:25 |
|
|
namejm
荣誉版主
       batch fan
积分 5226
发帖 1737
注册 2006-3-10 来自 成都
状态 离线
|
『第 8 楼』:
使用 LLM 解释/回答一下
Originally posted by martin325 at 2006-2-23 08:53:
cd\
D:
cd "fggg"
echo.|del "*.*"
按上面的写法,执行批处理后,不行!还是确认删除,按“Y”或“N”才肯继续执行
XP下的Del命令已经有了 /q 静音删除模式开关,直接加 /q更简洁.
Originally posted by martin325 at 2006-2-23 08:53:
cd\
D:
cd "fggg"
echo.|del "*.*"
According to the above writing, after executing the batch processing, it doesn't work! It still asks for confirmation to delete, and only continues to execute after pressing "Y" or "N"
In XP, the Del command already has the /q silent delete mode switch, directly adding /q is more concise.
|
|
2006-4-17 23:33 |
|
|
xjmxjm1234
中级用户
   论坛第一菜鸟
积分 361
发帖 166
注册 2006-4-15
状态 离线
|
『第 9 楼』:
使用 LLM 解释/回答一下
Originally posted by martin325 at 2006-2-22 07:59 PM:
本人的D盘里有一个文件夹,名称为Temporary Internet Files,现在想做一个在WINXP系统运行的批处理文件,用来删除该文件夹里的所有文件,请问这么长的斠...
人家问的可是怎么表示啊!
如果没有其他Tempor开头的文件夹时,应当是 Tempor~1 才对!
Originally posted by martin325 at 2006-2-22 07:59 PM:
There is a folder named "Temporary Internet Files" in my D drive. Now I want to make a batch file that runs in the WINXP system to delete all the files in this folder. May I ask how to express...
What is being asked is how to represent it!
If there are no other folders starting with "Tempor", it should be "Tempor~1".
|

Diskette Operating System |
|
2006-4-18 16:56 |
|