|
lotus516
高级用户
    论坛上抢劫的
积分 551
发帖 246
注册 2006-9-21
状态 离线
|
『楼 主』:
dir求助
使用 LLM 解释/回答一下
我dir一个文件夹,可得到的文件排列如下:
第10章.txt
第11章.txt
第12章.txt
第13章.txt
第14章.txt
第15章.txt
第16章.txt
第17章.txt
第18章.txt
第19章.txt
第1章.txt
第20章.txt
第21章.txt
第22章.txt
第23章.txt
第24章.txt
第25章.txt
第26章.txt
第27章.txt
第28章.txt
第29章.txt
第2章.txt
第3章.txt
第4章.txt
第5章.txt
第6章.txt
第7章.txt
第8章.txt
第9章.txt
我想得到如下的排列,请问参数是什么?
第1章.txt
第2章.txt
第3章.txt
第4章.txt
第5章.txt
第6章.txt
第7章.txt
第8章.txt
第9章.txt
第10章.txt
第11章.txt
第12章.txt
第13章.txt
第14章.txt
第15章.txt
第16章.txt
第17章.txt
第18章.txt
第19章.txt
第20章.txt
第21章.txt
第22章.txt
第23章.txt
第24章.txt
第25章.txt
第26章.txt
第27章.txt
第28章.txt
第29章.txt
I dir a folder, and the files obtained are arranged as follows:
Chapter 10.txt
Chapter 11.txt
Chapter 12.txt
Chapter 13.txt
Chapter 14.txt
Chapter 15.txt
Chapter 16.txt
Chapter 17.txt
Chapter 18.txt
Chapter 19.txt
Chapter 1.txt
Chapter 20.txt
Chapter 21.txt
Chapter 22.txt
Chapter 23.txt
Chapter 24.txt
Chapter 25.txt
Chapter 26.txt
Chapter 27.txt
Chapter 28.txt
Chapter 29.txt
Chapter 2.txt
Chapter 3.txt
Chapter 4.txt
Chapter 5.txt
Chapter 6.txt
Chapter 7.txt
Chapter 8.txt
Chapter 9.txt
I want to get the following arrangement. What are the parameters?
Chapter 1.txt
Chapter 2.txt
Chapter 3.txt
Chapter 4.txt
Chapter 5.txt
Chapter 6.txt
Chapter 7.txt
Chapter 8.txt
Chapter 9.txt
Chapter 10.txt
Chapter 11.txt
Chapter 12.txt
Chapter 13.txt
Chapter 14.txt
Chapter 15.txt
Chapter 16.txt
Chapter 17.txt
Chapter 18.txt
Chapter 19.txt
Chapter 20.txt
Chapter 21.txt
Chapter 22.txt
Chapter 23.txt
Chapter 24.txt
Chapter 25.txt
Chapter 26.txt
Chapter 27.txt
Chapter 28.txt
Chapter 29.txt
|
|
2006-12-2 14:48 |
|
|
lbccyxs
初级用户
 
积分 54
发帖 27
注册 2006-12-2
状态 离线
|
『第 2 楼』:
使用 LLM 解释/回答一下
好象不可以。
第1章.txt 改为 第01章.txt
就可以了
It seems not. Just change "第1章.txt" to "第01章.txt" and it will be okay.
|
|
2006-12-2 15:03 |
|
|
namejm
荣誉版主
       batch fan
积分 5226
发帖 1737
注册 2006-3-10 来自 成都
状态 离线
|
『第 3 楼』:
使用 LLM 解释/回答一下
你是需要把 第×章 ×换成两位数,不足两位的在前面补0,然后升序排列它们是吗?看了你两层楼的描述,仍然不太敢确定你究竟想要实现什么目的,请把你的意思表达清楚。
另外,这个 × 是不是只有阿拉伯数字格式?请把完整的需求说一下,这样才好写代码。
You need to replace the "×" in Chapter × with a two-digit number, padding with 0 in front if it's less than two digits, and then sort them in ascending order? After looking at the descriptions of your two floors, I'm still not very sure about exactly what purpose you want to achieve. Please make your meaning clear.
Also, is this "×" only in Arabic numeral format? Please state the complete requirement so that it's easier to write code.
|

尺有所短,寸有所长,学好CMD没商量。
考虑问题复杂化,解决问题简洁化。 |
|
2006-12-2 20:12 |
|
|
GOTOmsdos
铂金会员
       C++启程者
积分 5154
发帖 1827
注册 2003-7-18
状态 离线
|
『第 4 楼』:
使用 LLM 解释/回答一下
楼主的要求本身没有规律
The requirements of the thread starter itself have no pattern
|
|
2006-12-2 21:31 |
|
|
lotus516
高级用户
    论坛上抢劫的
积分 551
发帖 246
注册 2006-9-21
状态 离线
|
『第 5 楼』:
使用 LLM 解释/回答一下
我的语言真的差?第二次别人不能理解我的意思了!!!!!!!汗!!!!!!!
我是说原文件名就是从第1章-第29章的,而我并不把原文件名改掉,DIR一个文件夹>1.txt,得到的TXT文本要从小到大的排列,不要向上面的第一个排列那样从10-19在排1,接着20-29再排2,再3-9!!我目的是得到从1-9在10-19,再20-29这样的排列!!!因为用批不好生成其它的可以升序的文件(还是能力不足?),故只考虑阿拉伯数字格式!!还有一点我如用批生成这样以01-20命名的文件,FOR语句应如何写,从文本读取变量的方法不考虑!!
Is my language really bad? The second time someone couldn't understand what I meant!!!!!!! Sweat!!!!!!!
I mean the original file names are from Chapter 1 to Chapter 29, and I don't change the original file names. DIR a folder > 1.txt, and the TXT text should be arranged from small to large. Don't arrange like the first one above where 10-19 are arranged first, then 1, then 20-29, then 2, then 3-9!!My purpose is to get the arrangement from 1-9, then 10-19, then 20-29 like this!!! Because it's difficult to generate other files that can be sorted in ascending order with batch (or I'm not capable enough?), so only the Arabic numeral format is considered!! Also, if I use batch to generate files named 01-20 like this, how should the FOR statement be written? The method of reading variables from the text is not considered.
|
|
2006-12-3 03:49 |
|
|
vkill
金牌会员
     
积分 4103
发帖 1744
注册 2006-1-20 来自 甘肃.临泽
状态 离线
|
|
2006-12-3 04:07 |
|
|
redtek
金牌会员
     
积分 2902
发帖 1147
注册 2006-9-21
状态 离线
|
  『第 7 楼』:
使用 LLM 解释/回答一下
dir /b 第?章.txt > List.txt && dir /b 第??章.txt >> List.txt
得到的文件列表存到 List.txt 文件内:
第1章.txt
第2章.txt
第3章.txt
第4章.txt
第5章.txt
第6章.txt
第7章.txt
第8章.txt
第9章.txt
第10章.txt
第11章.txt
第12章.txt
第13章.txt
第14章.txt
第15章.txt
第16章.txt
第17章.txt
第18章.txt
第19章.txt
第20章.txt
第21章.txt
第22章.txt
第23章.txt
第24章.txt
第25章.txt
第26章.txt
第27章.txt
第28章.txt
第29章.txt
```
dir /b 第?章.txt > List.txt && dir /b 第??章.txt >> List.txt
The obtained file list is stored in the List.txt file:
Chapter 1.txt
Chapter 2.txt
Chapter 3.txt
Chapter 4.txt
Chapter 5.txt
Chapter 6.txt
Chapter 7.txt
Chapter 8.txt
Chapter 9.txt
Chapter 10.txt
Chapter 11.txt
Chapter 12.txt
Chapter 13.txt
Chapter 14.txt
Chapter 15.txt
Chapter 16.txt
Chapter 17.txt
Chapter 18.txt
Chapter 19.txt
Chapter 20.txt
Chapter 21.txt
Chapter 22.txt
Chapter 23.txt
Chapter 24.txt
Chapter 25.txt
Chapter 26.txt
Chapter 27.txt
Chapter 28.txt
Chapter 29.txt
此帖被 +9 点积分 点击查看详情 评分人:【 youxi01 】 | 分数: +4 | 时间:2006-12-3 05:04 | 评分人:【 ccwan 】 | 分数: +5 | 时间:2006-12-3 21:06 |
|
|

Redtek,一个永远在网上流浪的人……
_.,-*~'`^`'~*-,.__.,-*~'`^`'~*-,._,_.,-*~'`^`'~*-,._,_.,-*~'`^`'~*-,._ |
|
2006-12-3 04:22 |
|
|
Michael
钻石会员
       
积分 10046
发帖 3039
注册 2002-11-11
状态 离线
|
『第 8 楼』:
使用 LLM 解释/回答一下
复杂问题简单化---聪明人之举!
Simplify complex problems---a smart move!
|

简单就是美 |
|
2006-12-3 13:39 |
|
|
ccwan
金牌会员
     
积分 2725
发帖 1160
注册 2006-9-23 来自 河北廊坊
状态 离线
|
|
2006-12-3 21:07 |
|