中国DOS联盟论坛

中国DOS联盟

-- 联合DOS 推动DOS 发展DOS --
联盟域名:www.cn-dos.net 论坛域名:www.cn-dos.net/forum
游客 | 登录 | 注册 | 会员 | 搜索 | 中国DOS联盟
中国DOS联盟论坛
现在时间是 2026-08-11 07:03
47,811 主题排行 / 349,897 发帖 / 今日 0 篇 / 48,256 会员排行
DOS批处理 & 脚本技术(批处理室) » 合并文件夹的疑问?
可打印版本  2,333 / 21
第1楼 q1a2z3q1a2z3 发表于 2008-08-16 00:10
初级用户 发帖 41 积分 88
合并文件夹的疑问?
合并文件夹的疑问?

合并 D盘下 若干文件夹,因为文件夹的名字经常变动,所以感觉无从下手。

不知怎样把这些文件夹合并成一个文件夹。
第2楼 HAT 发表于 2008-08-16 00:18
版主 发帖 5,017 积分 9,023
第3楼 q1a2z3q1a2z3 发表于 2008-08-16 09:50
初级用户 发帖 41 积分 88
想把1-8(包括其中的子文件夹)的文件夹中的文件(phrases.ini文件除外)都放到到”合并“文件夹。如果在目录中存在同名的文件,则把同名的文件重新命名为原文件名.old

注释:文件夹的名字经常变动,不一定是1-8

phrases.ini

如图:
http://v.iseeclan.com/?i=2008-8/3/8241740/1.JPG



要达到的效果
http://v.iseeclan.com/?i=2008-8/3/8240003/1.JPG

[ Last edited by q1a2z3q1a2z3 on 2008-8-16 at 01:27 PM ]
第4楼 HAT 发表于 2008-08-16 11:53
版主 发帖 5,017 积分 9,023
贴图的时候,需要把链接放到img标签里面,我先看看效果:




第5楼 HAT 发表于 2008-08-16 12:15
版主 发帖 5,017 积分 9,023
第6楼 q1a2z3q1a2z3 发表于 2008-08-16 12:51
初级用户 发帖 41 积分 88
亲爱的HAT!

对于你我已经无话可说了!太感动了。

一而再、再而三的帮助我这样一个批处理的弱者的,-^^-

一个重庆人,毫无利己的动机,把一个陌生人的bat当作他自己的事业,这是什么精神?这是国际主义的精神,这是共产主义的精神,每一个中国人都要学习这种精神。

再次感谢!
第7楼 q1a2z3q1a2z3 发表于 2008-08-16 14:54
初级用户 发帖 41 积分 88
同名文件,无法重命名?最后合并的文件夹只能保存一个文件。
第8楼 lxmxn 发表于 2008-08-16 14:59
版主 发帖 4,938 积分 11,386
Originally posted by q1a2z3q1a2z3 at 2008-8-16 12:51:
亲爱的HAT!

对于你我已经无话可说了!太感动了。

一而再、再而三的帮助我这样一个批处理的弱者的,-^^-

一个重庆人,毫无利己的动机,把一 ...

Orz
第9楼 HAT 发表于 2008-08-16 19:13
版主 发帖 5,017 积分 9,023
Re 7楼
第10楼 BC 发表于 2008-08-16 19:17
中级用户 发帖 175 积分 338
建议一下,能否以后在写的时候加上注解呢?
新手很难看地懂...
第11楼 HAT 发表于 2008-08-16 19:21
版主 发帖 5,017 积分 9,023
哪句不懂问哪句吧,写注释浪费时间。
完全不懂的话,先看看教程。
第12楼 BC 发表于 2008-08-16 19:32
中级用户 发帖 175 积分 338
嗯,这样也行...
第13楼 BC 发表于 2008-08-16 19:33
中级用户 发帖 175 积分 338
%%~nxb

是什么意思?
第14楼 HAT 发表于 2008-08-16 19:54
版主 发帖 5,017 积分 9,023
Re 13楼
for /?
In addition, substitution of FOR variable references has been enhanced.
You can now use the following optional syntax:

%~I - expands %I removing any surrounding quotes (")
%~fI - expands %I to a fully qualified path name
%~dI - expands %I to a drive letter only
%~pI - expands %I to a path only
%~nI - expands %I to a file name only
%~xI - expands %I to a file extension only
%~sI - expanded path contains short names only
%~aI - expands %I to file attributes of file
%~tI - expands %I to date/time of file
%~zI - expands %I to size of file
%~$PATH:I - searches the directories listed in the PATH
environment variable and expands %I to the
fully qualified name of the first one found.
If the environment variable name is not
defined or the file is not found by the
search, then this modifier expands to the
empty string

The modifiers can be combined to get compound results:

%~dpI - expands %I to a drive letter and path only
%~nxI - expands %I to a file name and extension only
%~fsI - expands %I to a full path name with short names only
%~dp$PATH:I - searches the directories listed in the PATH
environment variable for %I and expands to the
drive letter and path of the first one found.
%~ftzaI - expands %I to a DIR like output line
第15楼 BC 发表于 2008-08-16 21:12
中级用户 发帖 175 积分 338
哦,原来这样,hat你的机是英文版?不错哦
1 2  下一页
[ 联系联盟系统管理团队 - 中国DOS联盟 - 标准版 ]
Sponsored by ifanr Inc | © 2001–2023