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-06-22 12:00
中国DOS联盟论坛 » DOS疑难解答 & 问题讨论 (解答室) » [Help]How to open a folder copied under DOS in Windows? View 2,540 Replies 6
Original Poster Posted 2004-04-17 00:00 ·  中国 山东 济南 教育网
初级用户
Credits 113
Posts 3
Joined 2004-04-17 00:00
22-year member
UID 22708
Gender Male
Status Offline
Recently, the system crashed, and I could only enter DOS to back up some files. I used the command `copy c:\asd d:\a`. Here, `asd` is a folder, but after reinstalling the system, I found that `d:\a` on the D drive is just an unregistered file, not a folder anymore. What should I do?
Floor 2 Posted 2004-04-17 00:00 ·  中国 天津 南开区 联通
高级用户
★★
Credits 924
Posts 243
Joined 2003-07-09 00:00
22-year member
UID 6612
Gender Male
Status Offline
The COPY command can only copy files, it seems it can't copy subdirectories. You should use XCOPY or XXCOPY... and so on.
Floor 3 Posted 2004-04-17 00:00 ·  中国 河北 石家庄 联通
铂金会员
★★★★
网络独行侠
Credits 6,962
Posts 2,753
Joined 2003-04-16 00:00
23-year member
UID 1565
Gender Male
From 河北保定
Status Offline
The reason is that there was no a folder in your original D drive, so the copy command merged all the files in the c:\asd directory into one a file.

The correct way to copy is like this:
md d:\a
copy c:\asd d:\a

Of course, you don't need to create the target directory first if you use xcopy with the /i parameter.
xcopy /i c:\asd d:\a
偶只喜欢回答那些标题和描述都很清晰的帖子!
如想解决问题,请认真学习“这个帖子”和“这个帖子”并努力遵守,如果可能,请告诉更多的人!
Floor 4 Posted 2004-04-17 00:00 ·  中国 山东 济南 教育网
初级用户
Credits 113
Posts 3
Joined 2004-04-17 00:00
22-year member
UID 22708
Gender Male
Status Offline
Oh, is that so? Then does that mean the data I backed up can't be recovered?
Floor 5 Posted 2004-04-26 00:00 ·  中国 河南 郑州 联通
初级用户
Credits 112
Posts 2
Joined 2004-04-25 00:00
22-year member
UID 23241
Gender Male
Status Offline
It should be using
md d:\a
xcopy c:\asd /s d:\a
In this way, all non-empty subdirectories under the asd folder are all copied over
Floor 6 Posted 2004-04-26 00:00 ·  中国 重庆 电信
银牌会员
★★★
Credits 2,202
Posts 499
Joined 2003-06-12 00:00
23-year member
UID 4876
Gender Male
Status Offline
I think /i is better. No matter whether the directory exists or not, it always copies your files with subdirectories as a directory.
一年四季,枫叶红了又红;人生四季,失去的,还能再来吗?—— !
Floor 7 Posted 2004-07-11 00:00 ·  中国 山东 菏泽 联通
初级用户
Credits 112
Posts 2
Joined 2004-07-04 00:00
21-year member
UID 27803
Gender Male
Status Offline
Okay, I've also learned a trick
Forum Jump: