SFTPo : un client FTP/SFTP avec scripting interne gérable par line OLE

SFTPo est un client FTP/SFTP gérable depuis un autre soft par lien OLE ou en interne par script VBS/JS

avec cet outil tout ce que vous avez à faire par FTP sur server ou router peut être automatisé.

un exemple des commandes dispo :
*********************************************************************
*commandes available to manage SFTP interface
*********************************************************************
set cli = createobject("SFTPOLE.server")

*     cli.IpOut(A$)               to give IP adress
*     cli.PortOut(A$)             to give Port Number
*     cli.UserOut(A$)             to send automatic user A$= request of User / B$ = User to send    
*     cli.Connect(A$)             "ON"/"OFF" to connect/disconnect to server
*     cli.MkDir(A$)               to create a directory on current directory of server
*A$ = cli.CurDirIn                  to read Current directory on server
*     cli.DirUp                   to go to parent directory
*     cli.RmDir(A$)               to remove a directory on current directory of server
*     cli.Rename(A$),(B$)         to rename a file A$ to B$ in current directory of server
*     cli.Download(A$),(B$),(C$)  to download a file A$ from current directory in server to specified file B$ in PC
                                 C$ = Replace/Append/Undo
*     cli.Upload(A$),(B$)         to upload a file to server in current directory
                                  B$ = Replace/Append/Undo
*     cli.TrAbort                 to abort Upload or Download
*     cli.ChDir(A$)               to go to a dedicated directory on server
*A$ = cli.FileInfoIn(B$)          B$ = "filname" => give all infos on this file
                                 B$ = "" => to list the content of current directory on server
                                 similar at the screen but with "|" separators
*A$ = cli.TextIn                  to read all execution lines received after last command sent
*A$ = cli.StatusIn                to read connexion status ("Connected" if connected)
*A$ = cli.MsgIn                   to read last execution line received after last command sent
*     cli.Delete(A$)              To delete a file on server
*     cli.Show(A)                 0/1/2 to manage SFTPOle windows Invisible/protected+Visible/Visible
                                 3 = no automatic clear of Textin at command received
*     cli.WaitFor(A),(B$),(C$)    0<4 KeyWords A$ to search in text to receive
                                 => if B$ = "" then modification of WaitStatus
                                 => if B$ <> "" then B$ is sent on command line
*A$ = cli.WaitStatus              to read result of WaitFor search (if nothing to send back)
                                 if in WaitFor() A$ <> "" and B$ = "" => WaitStatus positionned
                                 result = $1+$2+$4+$8+$10 for WaitFor(0,1,2,3,4))
                                 => reset of WaitStatus is automatic at each new command sent
*     cli.WaitReset               to reset WaitStatus
*     cli.IniReset                to Reset WaitFor(), Filterfor() and Show()
*     cli.PasswOut(A$)           to send automatic Password A$= request of password / B$ = Password to send
*     cli.SSHSet(A$)             "ON"/"OFF" to make a connexion in SSFTP or FTP
*A$ = cli.FileExist($))          B$ = fileNAME
                                A$ = "" => file don't exist
                                     "d" => it is a directory
                                     "-" => it is a file
                                     "l" => it is a link      
*     cli.Trace(A$)              "ON"/"OFF" to  activate/desactivate Traces                                                          
*     cli.Log (A$)               not used

*******************************************************************************
* Next commands are availables only when script is launched from SFTPo
*******************************************************************************
*A$ = cli.ScriptName             to have name of scrip running     
*A$ = cli.ScriptFullName         to have full name of scrip running 
*     cli.Pause                  to pause script running
*     cli.Abort                  to abort script running
*     cli.sleep(A)               to stop script during A sec
*A$ = cli.Path                    to read path of SFTPo
*     cli.DoEvents               to give time to other applications
*     cli.Echo(A$)               to print a line in communication windows
********************************************************************************
* 2 way to manage by ole SFTPo
********************************************************************************
* 1) from internal script and no need to launch object by set "cli = createobject("SFTPOLE.server")"
*    OLE object is "SFTPo"  => this name of object is fix and unic
*    no need to register "SFTPo" object if you use internal scripting
* 2) from external script, you have to launch SFTPo object by set "cli = createobject("SFTPOLE.server")"
*    OLE object can have all names except "SFTPO"
*    You must register "SFTPo" object if you want to use external launch of SFTPo
*   
********************************************************************************
* to register SSHo like OLE object
********************************************************************************
* you can launch register.bat script to register SFTPo OLE object
* you can launch unregister.bat to unregister SFTPo OLE object 
* or ou have just to launch SFTPo and registration will be done automatically
********************************************************************************
********* you must be administrator in your PC or SSHo will not start **********
********************************************************************************
  SFTP%20ole
Ajouter un commentaire
Pseudo
Adresse email
Site internet (optionnel)
Votre commentaire
Fiche de l'article
Mise a jour21/12/2010
VisualisationVu 703 fois
PublicInternaute
CategorieDelphi - Grenier - Internet
Télécharger le logiciel
Télécharger29 fois
Taille772 ko
 
Auteur de l'article
m.pageaux m.pageaux
connecté le 17/04/2012
2 articles dans la section
Contacter l'auteur
Partager l'article