ftp : to upload multile files at same time
-
in my app, I use ftp raw commands to upload several files to server, after sending PASV and STOR from command port, file transfer starts on data port - so far so good. But, when I send same commands to server again to upload second file before first uploading completed , server answers "unknowing command" - to second PASV and STOR. So, I have to wait for first uploading completed to upload second file. Any comments as solution? Anything wrong in my ftp commands or process? how to upload 2 or more files at same time? how to open multiple data sockets (ports) with one command socket (port)? Thanks. .
-
in my app, I use ftp raw commands to upload several files to server, after sending PASV and STOR from command port, file transfer starts on data port - so far so good. But, when I send same commands to server again to upload second file before first uploading completed , server answers "unknowing command" - to second PASV and STOR. So, I have to wait for first uploading completed to upload second file. Any comments as solution? Anything wrong in my ftp commands or process? how to upload 2 or more files at same time? how to open multiple data sockets (ports) with one command socket (port)? Thanks. .
Just a guess, but wouldn't you need to create a second connection to the server to upload the second file simultaneously?
"One man's wage rise is another man's price increase." - Harold Wilson
"Fireproof doesn't mean the fire will never come. It means when the fire comes that you will be able to withstand it." - Michael Simmons
"Show me a community that obeys the Ten Commandments and I'll show you a less crowded prison system." - Anonymous
-
in my app, I use ftp raw commands to upload several files to server, after sending PASV and STOR from command port, file transfer starts on data port - so far so good. But, when I send same commands to server again to upload second file before first uploading completed , server answers "unknowing command" - to second PASV and STOR. So, I have to wait for first uploading completed to upload second file. Any comments as solution? Anything wrong in my ftp commands or process? how to upload 2 or more files at same time? how to open multiple data sockets (ports) with one command socket (port)? Thanks. .
The number of simultaneous transfers is under control of the server. When you send PASV, it will respond with none, one or more lines indicating a data port on which it is listening. If you can't work it out from reading manuals (RFC959 is a good start), find a real server that works, and get Wireshark on the job to see what messages go back and forth. (A good server like Filezilla maintains a log so you probably don't need Wireshark, but it'll be useful when you come to debugging your own code.) Peter
Software rusts. Simon Stephenson, ca 1994. So does this signature. me, 2012