Publié le 21/12/2010
Auteur m.pageaux
Réseaux sociaux
0 partages
0 tweets
0 plus
0 commentaires

SFTPo : client FTP avec scripting 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é.

Automatiser les commandes FTP


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 ole

Ajouter un commentaire

Les champs marqués d'un * sont obligatoires, les adresses emails se sont pas publiées.

A lire aussi

Réseaux sociaux
Présentation de l'article
Catégorie
Mise a jour
21/12/2010
Visualisation
vu 3143 fois
Public
Internaute
Auteur de la publication
m.pageaux
Membre confirmé
Auteur de 8 articles
|BIO_PSEUDO|
Commentaires récents

Publié par Josalado dans CMS

je n'arrive pas à installer le logiciel <br>Message d'erreur : l'assistant d'installation n'a pas pu créer le dossier C:\program Files\Olibul <br>...

Publié par Bonjour dans java

Joli travail!
Par contre, savez vous que votre barre de progression s'arrête à un certain pourcentage?

Publié par ING_BIO dans CMS

tres bonnes aide merci

Publié par hungerGames dans php5

Salut!
je suis un debutant en php,et lorsque j'ai execute le code
sur la creation de la base 'member',on m'a affiche cet message:
"Undefined class constant 'ATT_ERRMOD...

Publié par Sophie dans tuto

Merci pour cette explication claire qui m'aide grandement... JS et moi, on est pas encore copain !