• Post Reply Bookmark Topic Watch Topic
  • New Topic

FTP client, file writing problems  RSS feed

 
Ivan Hrvatska
Greenhorn
Posts: 2
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I'm new to Java so my problem may be trivial. I'm writing a FTP client with abilities to login and upload data. here is the code:





So, the input should be formated like this: -u test -p test -server 127.0.0.1 -files /var/a.txt;/var/b.txt;/var/c.txt
for now I'm only trying to upload one file (files[0] - the first one), but the idea is to be able to upload up to 5 files at once
the trouble I'm encountering is that the file is uploaded but not under the designated name but as a NULL file (but the contents of it are the same - I opened it with notepad). for the love of God, I do not get what am I doing wrong and I am really stuck.
Also I must note that I am new to this and still do not have full grasp on everything used in this code. I may have made a mistake or ommited something but I cant figure out what. tnx in advace!
 
Paul Clapham
Sheriff
Posts: 22844
43
Eclipse IDE Firefox Browser MySQL Database
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Shouldn't you call setRemoteFile before you call connect?
 
Ivan Hrvatska
Greenhorn
Posts: 2
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Paul Clapham wrote:Shouldn't you call setRemoteFile before you call connect?


you Sir, made my day :D :D :D thank you. I guess I was just too tired and to much in the process to notice something that obvious :D tnx again!!! :)
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!