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-04 18:30
中国DOS联盟论坛 » DOS批处理 & 脚本技术(批处理室) » How to save xcopy's execution log into a TXT file View 1,038 Replies 3
Original Poster Posted 2007-04-27 23:25 ·  中国 广东 深圳 电信
初级用户
★★
Credits 135
Posts 61
Joined 2007-04-14 09:23
19-year member
UID 85115
Gender Male
Status Offline
I used xcopy to copy several hundred files, and I want to know whether it copied everything completely. If xcopy's execution log can be saved into a txt file, that would solve it.

I tried two methods:
1. Add > a.txt to the end of every xcopy
2. Add this after all xcopy commands have finished:
echo.Please wait, the log is being saved
工具.bat > 工具.txt

The results I found were:
1. The log can be saved, but the xcopy output is not shown on the bat screen;
2. The log can also be saved, but the screen stays at ——Please wait, the log is being saved
Pressing Enter also does not line-break to the following program; instead it goes back to the beginning and starts line-breaking other programs in order, but the screen still does not change.

The effect I hope to achieve:
It would be best to use the second method, because that would save the trouble of manually adding > a.txt to the end of every xcopy, and it also would not affect normal screen display. But how can I break out of it and continue line-breaking the following program? Please help me with this problem.
Floor 2 Posted 2007-04-28 03:41 ·  中国 广东 广州 海珠区 电信
银牌会员
★★★
Credits 1,206
Posts 517
Joined 2007-03-25 01:18
19-year member
UID 82819
Gender Male
Status Offline
Use start xcopy
知,不觉多。不知,乃求知
Floor 3 Posted 2007-04-28 11:10 ·  中国 广东 深圳 电信
初级用户
★★
Credits 135
Posts 61
Joined 2007-04-14 09:23
19-year member
UID 85115
Gender Male
Status Offline
Give it a try..
Floor 4 Posted 2007-05-25 17:14 ·  中国 广东 深圳 电信
初级用户
★★
Credits 135
Posts 61
Joined 2007-04-14 09:23
19-year member
UID 85115
Gender Male
Status Offline
Later I solved it by adding >>a.txt to the end of each xcopy.. Still, thanks to the friend in reply #2.
Forum Jump: