China DOS Union

-- Unite DOS · Advance DOS · Grow DOS --

Union site: www.cn-dos.net Forum site: www.cn-dos.net/forum
DOS stands for freedom, openness and progress. Let us work hard, learn from the openness and GNU spirit of FreeDOS and Linux, and together build and grow a free GNU GPL world!

中国DOS联盟论坛
The time now is 2026-08-11 07:57
中国DOS联盟论坛 » DOS批处理 & 脚本技术(批处理室) » Questions about merging folders? View 2,339 Replies 21
Floor 16 Posted 2008-08-18 00:04 ·  中国 江苏 苏州 电信
初级用户
Credits 88
Posts 41
Joined 2006-05-13 21:57
20-year member
UID 55479
Status Offline
If the file names are the same, after changing the file names, the desired effect is to be achieved. (The files that need to be renamed are not just Word files, this is just an example.)




After running according to your code, the result is like this (both are Word files)



[ Last edited by q1a2z3q1a2z3 on 2008-8-18 at 12:11 AM ]
Floor 17 Posted 2008-08-18 09:46 ·  美国 惠普HP
版主
★★★★★
Credits 9,023
Posts 5,017
Joined 2007-05-31 19:39
19-year member
UID 89899
Gender Male
Status Offline















Floor 18 Posted 2008-08-18 11:52 ·  中国 江苏 苏州 电信
初级用户
Credits 88
Posts 41
Joined 2006-05-13 21:57
20-year member
UID 55479
Status Offline
If there are three files with the same name, only two files can be saved after merging.

If there are multiple files with the same name and you want to merge them like this.
1.doc 1.old.doc 1.old.old.doc ................
Floor 19 Posted 2008-08-18 11:57 ·  美国 惠普HP
版主
★★★★★
Credits 9,023
Posts 5,017
Joined 2007-05-31 19:39
19-year member
UID 89899
Gender Male
Status Offline
The maximum path length supported by the Windows system is 225, right? If you have dozens of duplicate files, it will exceed this threshold. This solution is theoretically not feasible. Think of other methods.
Floor 20 Posted 2008-08-18 12:16 ·  中国 江苏 苏州 电信
初级用户
Credits 88
Posts 41
Joined 2006-05-13 21:57
20-year member
UID 55479
Status Offline
If you support changing 5 files with the same name, it should not exceed the system limit? Specifically how to modify?

[ Last edited by q1a2z3q1a2z3 on 2008-8-18 at 01:04 PM ]
Floor 21 Posted 2009-02-04 09:59 ·  中国 辽宁 鞍山 联通
新手上路
Credits 1
Posts 1
Joined 2009-02-03 10:04
17-year member
UID 137903
Gender Male
Status Offline
I want to keep the original file and change the merged file to another disk. How to write it? Which sentence means deleting the original file?
Floor 22 Posted 2009-02-04 11:13 ·  美国 华盛顿州 金 雷德蒙德 Microsoft
初级用户
★★
Credits 100
Posts 93
Joined 2009-01-14 15:04
17-year member
UID 136661
Gender Male
From 湖南
Status Offline
After the HAT code is executed, use the XCOPY command to move to the drive letter you want to move to. To delete the original file, you can use the del command. For the usage of xcopy and del, see del /? and xcopy /?
Forum Jump: