홈 · 개발 참고자료

개발 참고자료

[파워빌더] DOS 명령어를 이요하여 Ftp Upload 하기...

작성자
관리자
작성일
2016-10-16
조회
10817
분류
파워빌더
[DOS Batch file upload.bat]
@rem This file will attempt to upload 1 files to the ftp server
@c:
@cd\temp
@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 &
(handle(this),"open","upload.bat",ls_parm,ls_dir,0)
IF ll_ret < 32 THEN
MessageBox( "cannot load" , ll_ret )
END IF