我正在制作一个具有登录系统的应用程序,并且登录系统链接到FTP服务器,问题是,我不知道如何连接,上传,从FTP通过批量下载文件,这里有一些代码我试过了:
@echo off
echo user (user)> ftpcmd.dat
echo (pass)>> ftpcmd.dat
echo bin>> ftpcmd.dat
echo put %1>> ftpcmd.dat
echo quit>> ftpcmd.dat
ftp -n -s:ftpcmd.dat (serv name)
del ftpcmd.dat
这个工作,它确实连接到服务器,但连接后,它不执行即将发出的命令(连接后,它停留在连接的页面上,它没有做任何事情)
请不要抱着这个,告诉我,如果你什么都不懂,因为我现在已经有2次保持,我试图尽可能地保持,我试着让我的应用很好,请告诉我你是不是理解。
C:\Users\(CENSORED)>ftp server36.000webhost.com
Connected to server36.000webhost.com.
220---------- Welcome to Pure-FTPd [privsep] ----------
220-You are user number 13 of 500 allowed.
220-Local time is now 12:21. Server port: 21.
220-This is a private system - No anonymous login
220 You will be disconnected after 3 minutes of inactivity.
一段时间后......
C:\Users\(CENSORED)>ftp server36.000webhost.com
Connected to server36.000webhost.com.
220---------- Welcome to Pure-FTPd [privsep] ----------
220-You are user number 13 of 500 allowed.
220-Local time is now 12:21. Server port: 21.
220-This is a private system - No anonymous login
220 You will be disconnected after 3 minutes of inactivity.
Connection closed by remote host.
(它被困在这里,甚至没有给出一件事)