Archive: FTP: how to upload file to the server under subdir


FTP: how to upload file to the server under subdir
  hey,
i'm using ftpul.dll. upload generally works, but when i try to upload file under subdirectory it fails. and subfolder was already created.

and maybe someone can tell me how to check for existance of file in server.

any idea?


a line from a script using the FTPul plugin.

FTPul::upload "$FTP/$File" '$LocalDirectory\$File' $Login $Password"

dont see a reason, why uploading to subdirs shouldnt work, never had any problems. you using the ftp:// prefix?

using curl could be a solution for your second question.

i used this syntax:


FTPdl::download "ftp://www.zone.ee/vk/Evarukoopia.zip" "E:\Evarukoopia.zip" atsuktrp trp2E1 

>
and it didn't work... user name and passwords are correct, you can try by yourself

i guess it's the missing backslash for the local drive's address?


ooops:$
i used variables, and really missed that backslash :D
tnx

but can you tell me
how to check for existance of file in server.
and how to create subdirectory to the server.


but can you tell me how to check for existance of file in server.
Doesn't one of the ftp plugin return codes tell you if the file you are trying to download didn't exist? In that case it would be simple. Simply try to download the file if it fails and the return code is ? , then obviously the file doesn't exist.

As for your second question FTP supports the mkdir command. I'm not sure if the plugin does though.....As Yathosho suggested Curl will work.

yes, trying to download is really one solution, but immagine that the file can be 10MB or even more...it would take a lot of time.
tnx


one question, when the subfolder doesn't exist, is he created ???


where did you get that plugin . I cant find it on the archive .. do you mind attaching it .. merci :D


when subfolder doesn't exist it will abort upload.

plugin can be found from this page:
http://forums.winamp.com/showthread....ght=ftp+plugin


ah thanks alot ;)


ok i will have to use curl to create folder, thanks or i can use ftp.exe in windows folders too