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-07-01 10:26
中国DOS联盟论坛 » DOS开发编程 & 发展交流 (开发室) » 4K COPY small tool, supports long file names, multiple sources, directory copying and other functions View 2,142 Replies 10
Original Poster Posted 2007-03-22 16:52 ·  中国 台湾 中华电信
初级用户
Credits 66
Posts 24
Joined 2007-03-15 16:52
19-year member
UID 81846
Gender Male
Status Offline
A small program written a few years ago, recently I dug it out when making a boot disk to play around
See if any friends can help test it
The original purpose was to write an xcopy tool that can work with DOSLFN
But I was too lazy to write too many functions, only implemented the most commonly used /s parameter

After finishing it before, I hardly tested it, so there may be some bugs
Be careful when using it (especially when adding the /M parameter)

Parameter description:
CP source
There can be multiple sources, wildcards can be used, the last parameter specifies the destination
If there is only one parameter, it is regarded as the source, the destination is the current directory, the same as DOS's COPY
/S Copy subdirectories
/M Move files (delete source after successful copy)
/J Combine files
/D Specify destination as directory, not file
/V Verify copy result
/Y Do not ask, always answer Yes
/N Do not use long filenames even in environments with long filename support

Supplementary instructions:
1. If there is no /j or /d, and it cannot be judged whether the destination is a file or a directory, a prompt will appear
2. Long filename support needs to be under Win9x/2K/XP or pure DOS with DOSLFN or LFNDOS mounted
3. When specifying the destination as a directory, non-existent directories and subdirectories can be automatically created

http://zhenlove.com.cn/cndos/fileup/files/cp.zip

[ Last edited by silveregg on 2007-3-22 at 06:47 PM ]
Recent Ratings for This Post ( 1 in total) Click for details
RaterScoreTime
Wengier +10 2007-03-22 22:01
Floor 2 Posted 2007-03-22 17:43 ·  加拿大 Bell
系统支持
★★★★★★
“新DOS时代”站长
Credits 27,736
Posts 10,521
Joined 2002-10-09 12:00
23-year member
UID 9
Status Offline
A simple test was done, and it feels very good. No bugs have been found for the time being. I will do a more detailed test when I have time in a few days.

It is suggested to add an option (such as /I): only copy files that do not exist, and automatically ignore existing files, which is equivalent to "do not ask, always answer No". In addition, it is suggested to directly press keys like Y, N, etc. when asking whether to overwrite the file, without having to press the Enter key again.
Wengier - 新DOS时代

欢迎大家来到我的“新DOS时代”网站,里面有各类DOS软件和资料,地址:
http://wendos.mycool.net/

E-Mail & MSN: wengierwu AT hotmail.com (最近比较忙,有事请联系DOSroot和雨露,谢谢!)

Floor 3 Posted 2007-03-23 07:51 ·  中国 台湾 中华电信
初级用户
Credits 66
Posts 24
Joined 2007-03-15 16:52
19-year member
UID 81846
Gender Male
Status Offline
Thanks to Wengier for testing and suggestions.

Currently known bugs:
The remaining disk space cannot be correctly judged in the XP command line window (insufficient space is misjudged when copying large files)
But this seems to be an issue with XP itself, and no solution has been thought of yet...
No such problem under DOS and Win98
Floor 4 Posted 2007-03-24 19:00 ·  加拿大 Bell
系统支持
★★★★★★
“新DOS时代”站长
Credits 27,736
Posts 10,521
Joined 2002-10-09 12:00
23-year member
UID 9
Status Offline
Originally posted by silveregg at 2007-3-22 06:51 PM:
Thanks to Wengier for testing and suggestions

Known bugs:
The remaining disk space cannot be correctly judged in the XP command line window (insufficient space is misjudged when copying large files)
But this seems to be due to XP itself...


Well, but generally it is used under DOS because this software is really needed only under DOS. Under XP, people usually directly use XP's own XCOPY that supports long filenames.

By the way, maybe renaming this software to XCP would be better. On one hand, it can show that it is more powerful than ordinary COPY, supports more functions, and on the other hand, it can be distinguished from the CP command in Unix/Linux/Cygwin to avoid confusion.
Wengier - 新DOS时代

欢迎大家来到我的“新DOS时代”网站,里面有各类DOS软件和资料,地址:
http://wendos.mycool.net/

E-Mail & MSN: wengierwu AT hotmail.com (最近比较忙,有事请联系DOSroot和雨露,谢谢!)

Floor 5 Posted 2007-03-24 23:28 ·  中国 山东 济宁 兖州区 联通
钻石会员
★★★★★
Credits 10,046
Posts 3,039
Joined 2002-11-11 00:00
23-year member
UID 223
Gender Male
Status Offline
Yeah, this software is fine as long as it performs perfectly under DOS. It's great that it supports long filenames.
简单就是美
Floor 6 Posted 2007-03-25 05:10 ·  中国 台湾 中华电信(HiNet)数据中心
初级用户
Credits 66
Posts 24
Joined 2007-03-15 16:52
19-year member
UID 81846
Gender Male
Status Offline
During testing, it was found that certain CP950 traditional Chinese filenames still cannot be properly handled in the DOS environment. It has been confirmed that this is an issue with DOSLFN. Currently, an attempt is being made to contact the author for assistance in improvement. (Although DOSLFN comes with source code, there are no奈德 documents explaining it, which is really hard to understand, and I'm too lazy to study it slowly.) When all problems are solved, the plan is to re - make XCP and add the functions suggested above.
Floor 7 Posted 2007-03-31 14:35 ·  加拿大 多伦多大学
系统支持
★★★★★★
“新DOS时代”站长
Credits 27,736
Posts 10,521
Joined 2002-10-09 12:00
23-year member
UID 9
Status Offline
Is there any progress on that side now?
Wengier - 新DOS时代

欢迎大家来到我的“新DOS时代”网站,里面有各类DOS软件和资料,地址:
http://wendos.mycool.net/

E-Mail & MSN: wengierwu AT hotmail.com (最近比较忙,有事请联系DOSroot和雨露,谢谢!)

Floor 8 Posted 2007-04-01 00:39 ·  中国 香港 Cyber_Express通信公司
银牌会员
★★★
阿林
Credits 1,410
Posts 497
Joined 2004-06-28 00:00
22-year member
UID 27551
Gender Male
From 九龍,香港
Status Offline
Originally posted by silveregg at 2007-3-23 07:51 AM:
Known bugs so far:
In the XP command line window, the remaining disk space cannot be correctly judged (insufficient space is misjudged when copying large files)
But this seems to be an issue with XP itself, and no solution has been thought of yet...
There is no such problem under DOS and Win98



Under XP, it is necessary to use Win32 functions, otherwise it will not be accurate, but this is not compatible under pure DOS.

There are solutions, but the former is a bit clumsy, and the latter is quite troublesome...

1) Separate the DOS version and the Win32 Console version (just like OneDir and OneDir32)

2) There is something called a Stub in the DOS header to judge whether it is DOS or Win32 (this function has been available since MSVC 6), put the Win32 and DOS in one file, and judge whether it is the Win32 and DOS version through the Stub to jump to the relevant position
我 的 網 站 - http://optimizr.dyndns.org
Floor 9 Posted 2007-04-01 00:43 ·  中国 香港 Cyber_Express通信公司
银牌会员
★★★
阿林
Credits 1,410
Posts 497
Joined 2004-06-28 00:00
22-year member
UID 27551
Gender Male
From 九龍,香港
Status Offline
Originally posted by silveregg at 2007-3-25 05:10 AM:
(Although DOSLFN comes with source code, there is really no奈德文explanation, so it's really hard to understand, and I'm too lazy to study it slowly)



You can contact Jason Hood, who is Australian and can use English.

Website:

http://www.geocities.com/jadoxa/doslfn/index.html

Email:

jadoxa@yahoo.com.au

The subject must be DOSLFN
我 的 網 站 - http://optimizr.dyndns.org
Floor 10 Posted 2007-04-01 16:11 ·  中国 台湾 中华电信
初级用户
Credits 66
Posts 24
Joined 2007-03-15 16:52
19-year member
UID 81846
Gender Male
Status Offline
I have thought about using the stub method, but first, it increases the file size, and second, this tool is obviously not practical under Win32, so I didn't consider it.

In fact, the stub is not to jump to the relevant position after judgment; the stub itself is a complete DOS program. Because basically, DOS and Win32 programs are completely incompatible, and normally they cannot share code. But this is aside from the main topic and won't be discussed here.

Still, I thank johnsonlam for the suggestion.

As for contacting Mr. Jason Hood, I wrote to him before and explained the problem.

The reply I got is:


I shall look into it, but no promises when.

Jason.


That is to say, he will pay attention to it, but just don't know when the problem can be improved
Floor 11 Posted 2007-09-24 22:37 ·  中国 广东 深圳 福田区 电信
新手上路
Credits 12
Posts 6
Joined 2007-09-07 21:09
18-year member
UID 96818
Gender Male
Status Offline
Look! ! ! ! ! ! ! ! !
Forum Jump: