Share this page 

Upload a file using FTPTag(s): WinAPI/Registry

[DOS Batch file  upload.bat]
@rem This file will attempt to upload 1 files to the ftp server
@echo open ftpserveripaddress >> t
@echo userid >> t
@echo password >> t
@echo binary >> t
@echo cd uploaddirectoryname >> t
@echo mput filenametobeuploaded  >> t
@echo bye >> t
@ftp -i -s:t
@del t

[PB external function declaration]
FUNCTION long ShellExecute (uint  ihwnd,string  lpszOp,string
   lpszFile,string  lpszParams, string  lpszDir,int  wShowCmd ) 
   LIBRARY "Shell32.dll" ALIAS FOR "ShellExecuteA" 

[PB ftp upload example]
string ls_parm, ls_dir
uint ll_ret
ls_parm = ""
ls_dir  =  "c:\path\"

ll_ret = ShellExecute &
IF ll_ret < 32 THEN
     MessageBox( "cannot load" , ll_ret )