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-30 01:05
中国DOS联盟论坛 » DOS疑难解答 & 问题讨论 (解答室) » [Help] How to write ftp return information to a log under DOS and display it on the screen View 821 Replies 4
Original Poster Posted 2006-03-02 10:06 ·  中国 福建 厦门 电信
新手上路
Credits 6
Posts 1
Joined 2006-03-02 10:04
20-year member
UID 51211
Status Offline
Experts, please help. Many thanks in advance!
Floor 2 Posted 2006-03-02 17:43 ·  中国 山西 临汾 中移铁通
元老会员
★★★★
Batchinger
Credits 4,432
Posts 1,512
Joined 2002-10-18 00:00
23-year member
UID 19
Gender Male
Status Offline
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 ]
※ Batchinger 致 Bat Fans:请访问 批处理编程的异类 ,欢迎交流与共享批处理编程心得!
Floor 3 Posted 2006-03-07 11:45 ·  美国 国际航空电讯集团公司(SITA)
初级用户
Credits 50
Posts 17
Joined 2006-02-27 23:44
20-year member
UID 51073
Gender Male
Status Offline
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?
Floor 4 Posted 2006-03-07 13:42 ·  中国 广东 惠州 电信
初级用户
Credits 50
Posts 17
Joined 2006-02-27 23:44
20-year member
UID 51073
Gender Male
Status Offline
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?
Floor 5 Posted 2006-03-07 15:54 ·  中国 北京 顺义区 联通
银牌会员
★★★
DOS联盟捡破烂的
Credits 1,144
Posts 425
Joined 2005-10-20 00:00
20-year member
UID 43784
From 北京
Status Offline
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... ....
Forum Jump: