中国DOS联盟论坛

China DOS Union

-- Unite DOS · Advance DOS · Grow DOS --
Union site: www.cn-dos.net Forum site: www.cn-dos.net/forum
Guest | Log in | Register | Members | Search | China DOS Union
中国DOS联盟论坛
The time now is 2026-08-17 23:03
47,814 topics / 349,907 posts / today 4 new / 48,259 members
DOS疑难解答 & 问题讨论 (解答室) » [Help] How to write ftp return information to a log under DOS and display it on the screen
Printable Version  867 / 4
Floor1 malongzl Posted 2006-03-02 10:06
新手上路 Posts 1 Credits 6
Experts, please help. Many thanks in advance!
Floor2 willsort Posted 2006-03-02 17:43
元老会员 Posts 1,512 Credits 4,432
Re malongzl:

Under normal circumstances, ftp supports redirection, so:

ftp enter the ftp command line parameters > ftp.log
type the ftp commands

Of course, you can also write the ftp commands into a script file. This is the simplest example:

echo q>ftp.scr
ftp < ftp.scr > ftp.log
type ftp.log

[ Last edited by willsort on 2006-3-2 at 19:40 ]
Floor3 robinlong Posted 2006-03-07 11:45
初级用户 Posts 17 Credits 50
Question for the moderator in reply #2: is there any way to make the contents of this log file accumulate? That is, not overwrite the previous contents, but append after them?
Floor4 robinlong Posted 2006-03-07 13:42
初级用户 Posts 17 Credits 50
I later did it like this, please correct me if I'm wrong:
FTP -s:"e:\TEST\ftplogin.txt">>FTP.LOG
In ftplogin.txt I used a get file command. Is there any way to call DOS commands from within ftp?
Floor5 bagpipe Posted 2006-03-07 15:54
银牌会员 Posts 425 Credits 1,144 From 北京
Hmm, I think there is. I think you first use ! to switch to command-line mode, then execute the command, and then use EXIT to return to FTP mode. But I haven't tried it with the -s parameter. I'll test it when I have time. I'm just saying, just saying, that's all... ....
[ Contact the Union admin team - 中国DOS联盟 - Standard version ]
Sponsored by ifanr Inc | © 2001–2023