|
chenhui530
高级用户
   
积分 772
发帖 273
注册 2004-10-23
状态 离线
|
『第 16 楼』:
使用 LLM 解释/回答一下
不是吧
md 666
cd 666
for %%a in (1 2 3 4 5 6...100) do echo .>%%a.txt
Come on
md 666
cd 666
for %%a in (1 2 3 4 5 6...100) do echo .>&%a.txt
|

http://www.msfans.net/bbs/ |
|
2005-3-10 00:00 |
|
|
7451
初级用户
 
积分 140
发帖 16
注册 2005-3-10
状态 离线
|
『第 17 楼』:
使用 LLM 解释/回答一下
拜托,chenhui530 ,帮我拿个主意!谢谢!
Please, chenhui530, give me some advice! Thank you!
|
|
2005-3-10 00:00 |
|
|
chenhui530
高级用户
   
积分 772
发帖 273
注册 2004-10-23
状态 离线
|
『第 18 楼』:
使用 LLM 解释/回答一下
我没有98的系统我写出来也没办法测试啊
I don't have the Windows 98 system, so I can't test what I wrote either.
|

http://www.msfans.net/bbs/ |
|
2005-3-10 00:00 |
|
|
7451
初级用户
 
积分 140
发帖 16
注册 2005-3-10
状态 离线
|
『第 19 楼』:
使用 LLM 解释/回答一下
麻烦你多写些,我来测试,我把结果告诉你,我们共同来攻克这个难题,有信心吗???不甚感激!!!!
Please write more, I'll test it and tell you the result. Let's work together to solve this problem. Do you have confidence??? Greatly appreciate it!!!!
|
|
2005-3-10 00:00 |
|
|
chenhui530
高级用户
   
积分 772
发帖 273
注册 2004-10-23
状态 离线
|
『第 20 楼』:
使用 LLM 解释/回答一下
我想了下目前还没有想到不利用第三方工具能解决这个问题的办法.
要是允许使用第三方工具的话可以使用STRINGS完成这个操作让变量自动+1变量大于101就自动退出代码如下::kaishi
strings a=add %b%,1
if not exist %a% echo 1>%a%.txt
strings b=add %a%,1
if %b%==101 goto end
goto kaishi:end
I thought about it and haven't come up with a way to solve this problem without using third-party tools.
If third-party tools are allowed, you can use STRINGS to complete this operation to make the variable automatically +1. If the variable is greater than 101, it will automatically exit. The code is as follows:
:kaishi
strings a=add %b%,1
if not exist %a% echo 1>%a%.txt
strings b=add %a%,1
if %b%==101 goto end
goto kaishi
:end
|

http://www.msfans.net/bbs/ |
|
2005-3-10 00:00 |
|
|
7451
初级用户
 
积分 140
发帖 16
注册 2005-3-10
状态 离线
|
『第 21 楼』:
使用 LLM 解释/回答一下
我刚测试了,不好使!,每次都必须手动去编辑一个空文本文档,和下面这个代码差不多md 666
cd 666
for %%a in (1 2 3 4 5 6) do copy con %%a.txt现在关键需要解决的问题有两个1,如何自动生成(1~100)的文件夹或文件,不要手动填数字!2,如何自动编辑一个空文本文档你还有什么好方法,我们共同研究一下,我相信不用第三方软件,dos批处理是能够达到预期目的!!!
I just tested, it doesn't work! Every time I have to manually edit an empty text document, which is similar to the following code
md 666
cd 666
for %%a in (1 2 3 4 5 6) do copy con %%a.txt Now the key problems to be solved are two 1, how to automatically generate folders or files from (1~100) without manually filling in numbers! 2, how to automatically edit an empty text document Do you have any good methods, let's study together, I believe that without third-party software, DOS batch processing can achieve the expected goal!!!
|
|
2005-3-11 00:00 |
|
|
chenhui530
高级用户
   
积分 772
发帖 273
注册 2004-10-23
状态 离线
|
『第 22 楼』:
使用 LLM 解释/回答一下
:kaishi
strings a=add %b%,1
if not exist %a% echo 1>%a%.txt
strings b=add %a%,1
if %b%==101 goto end
goto kaishi:end
是你要的答案呀
: :kaishi
strings a=add %b%,1
if not exist %a% echo 1>%a%.txt
strings b=add %a%,1
if %b%==101 goto end
goto kaishi:end
This is the answer you want呀
|

http://www.msfans.net/bbs/ |
|
2005-3-11 00:00 |
|
|
7451
初级用户
 
积分 140
发帖 16
注册 2005-3-10
状态 离线
|
『第 23 楼』:
使用 LLM 解释/回答一下
如何自动编辑一个空文本文档
How to automatically edit an empty text document
|
|
2005-3-11 00:00 |
|
|
chenhui530
高级用户
   
积分 772
发帖 273
注册 2004-10-23
状态 离线
|
『第 24 楼』:
使用 LLM 解释/回答一下
以下是引用7451在2005-3-11 9:54:38的发言:
如何自动编辑一个空文本文档
你把意思说清楚
Below is the quote of 7451's post on 2005-3-11 9:54:38:
How to automatically edit an empty text document
Please clarify your meaning
|

http://www.msfans.net/bbs/ |
|
2005-3-11 00:00 |
|
|
7451
初级用户
 
积分 140
发帖 16
注册 2005-3-10
状态 离线
|
『第 25 楼』:
使用 LLM 解释/回答一下
用批处理建立空的空文本文档
Create an empty text document using batch processing
|
|
2005-3-11 00:00 |
|
|
chenhui530
高级用户
   
积分 772
发帖 273
注册 2004-10-23
状态 离线
|
『第 26 楼』:
使用 LLM 解释/回答一下
以下是引用7451在2005-3-11 14:31:30的发言:
用批处理建立空的空文本文档
这个问题比较难.用DOS很难但是使用其他脚本语言就很简单了
The following is a quote from 7451's post on 2005-3-11 14:31:30:
Create an empty text document using batch processing
This problem is relatively difficult. It's difficult with DOS but very simple using other scripting languages
|

http://www.msfans.net/bbs/ |
|
2005-3-11 00:00 |
|
|
Climbing
铂金会员
       网络独行侠
积分 6962
发帖 2753
注册 2003-4-16 来自 河北保定
状态 离线
|
『第 27 楼』:
使用 LLM 解释/回答一下
1、建议楼主写好帖子的标题,这种标题是最容易被人忽略的,详见我的签名档中的链接。2、关于你的问题:for %%a in (1 2 3 4 5 6...100) do md %%a 这种方式肯定是不行的,因为命令行超过了255个字符的限制,将for命令分开多写几个倒是可以考虑。md 666
cd 666
for %%a in (1 2 3 4 5 6...100) do echo %%a>%%a.txt
上面的命令要放到批处理文件中运行,如果在命令行直接运行,要将%%a改为%a。这都是DOS基础,建议楼主先学习一下手把手都你写批处理这个帖子。
1. It is suggested that the original poster (LZ) write a good title for the post. Such titles are the most likely to be overlooked. Please refer to the link in my signature.
2. Regarding your question: The way "for %%a in (1 2 3 4 5 6...100) do md %%a" is definitely not feasible because the command line exceeds the limit of 255 characters. It can be considered to separate the for command and write it in several parts.
md 666
cd 666
for %%a in (1 2 3 4 5 6...100) do echo %%a>%%a.txt
The above commands should be run in a batch file. If run directly in the command line, %%a should be changed to %a. These are all basics of DOS. It is suggested that the original poster first study the post "Hand-in-Hand to Write Batch Files for You".
|

偶只喜欢回答那些标题和描述都很清晰的帖子!
如想解决问题,请认真学习“这个帖子”和“这个帖子”并努力遵守,如果可能,请告诉更多的人!
|
|
2005-3-11 00:00 |
|
|
ebfok
初级用户
 
积分 87
发帖 33
注册 2006-6-20 来自 cs
状态 离线
|
『第 28 楼』:
使用 LLM 解释/回答一下
Dim fso, f,n
n=inputbox("请输入要建立的文件夹的数目:")
Set fso = CreateObject("Scripting.FileSystemObject")
for i=1 to n
Set f = fso.CreateFolder(i)
next
Dim fso, f, n
n = InputBox("Please enter the number of folders to create:")
Set fso = CreateObject("Scripting.FileSystemObject")
For i = 1 To n
Set f = fso.CreateFolder(i)
Next
|
|
2006-6-20 15:48 |
|
|
bagpipe
银牌会员
     DOS联盟捡破烂的
积分 1144
发帖 425
注册 2005-10-20 来自 北京
状态 离线
|
『第 29 楼』:
使用 LLM 解释/回答一下
md 666
cd 666
md 1 2 3 4 5 6 7 8 9.....50
md 51 52 53 54 ......100
不知道成不成,2000以上的系统应该没问题,不知道98可不可以
md 666
cd 666
md 1 2 3 4 5 6 7 8 9.....50
md 51 52 53 54 ......100
I don't know if it will work. It should be okay on systems above 2000. I don't know if it works on 98.
|
|
2006-6-20 16:53 |
|
|
kcdsw
中级用户
  
积分 404
发帖 179
注册 2006-3-30
状态 离线
|
『第 30 楼』:
使用 LLM 解释/回答一下
for %%a in (1 2 3 4 5 6 7 8 9) do for %%b in (1 2 3 4 5 6 7 8 9 0) do ( md %%a%%b ) & (md %%b) & (ren 0 100)
```
for %%a in (1 2 3 4 5 6 7 8 9) do for %%b in (1 2 3 4 5 6 7 8 9 0) do ( md %%a%%b ) & (md %%b) & (ren 0 100)
```
|
|
2006-6-21 09:17 |
|