- NSIS Discussion
 - FTP: how to upload file to the server under subdir
 
Archive: FTP: how to upload file to the server under subdir
atsuk
13th July 2004 17:23 UTC
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?
Yathosho
14th July 2004 01:06 UTC
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.
atsuk
14th July 2004 06:54 UTC
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
    
 
    
    
      Yathosho
      14th July 2004 07:18 UTC
      i guess it's the missing backslash for the local drive's address?
     
    
    
      atsuk
      14th July 2004 10:37 UTC
      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.
     
    
    
      zimsms
      14th July 2004 12:58 UTC
      
      
        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.
    
 
    
    
      atsuk
      15th July 2004 07:12 UTC
      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
     
    
    
      mumuri
      23rd July 2004 23:07 UTC
      one question, when the subfolder doesn't exist, is he created ???
     
    
    
      VegetaSan
      24th July 2004 00:54 UTC
      where did you get that plugin . I cant find it on the archive .. do you mind attaching it .. merci :D
     
    
    
      atsuk
      24th July 2004 08:52 UTC
      when subfolder doesn't exist it will abort upload.
      
      plugin can be found from this page:
      http://forums.winamp.com/showthread....ght=ftp+plugin
     
    
    
      VegetaSan
      24th July 2004 11:09 UTC
      ah thanks alot ;)
     
    
    
      mumuri
      24th July 2004 17:32 UTC
      ok i will have to use curl to create folder, thanks or i can use ftp.exe in windows folders too