Jump to content

Search the Community

Showing results for tags 'sftp'.

  • Search By Tags

    Type tags separated by commas.
  • Search By Author

Content Type


Forums

  • General
    • Announcements and Site News
    • Administration
  • AutoIt v3
    • AutoIt Help and Support
    • AutoIt Technical Discussion
    • AutoIt Example Scripts
  • Scripting and Development
    • Developer General Discussion
    • Language Specific Discussion
  • IT Administration
    • Operating System Deployment
    • Windows Client
    • Windows Server
    • Office

Categories

  • AutoIt Team
    • Beta
    • MVP
  • AutoIt
    • Automation
    • Databases and web connections
    • Data compression
    • Encryption and hash
    • Games
    • GUI Additions
    • Hardware
    • Information gathering
    • Internet protocol suite
    • Maths
    • Media
    • PDF
    • Security
    • Social Media and other Website API
    • Windows
  • Scripting and Development
  • IT Administration
    • Operating System Deployment
    • Windows Client
    • Windows Server
    • Office

Find results in...

Find results that contain...


Date Created

  • Start

    End


Last Updated

  • Start

    End


Filter by number of...

Joined

  • Start

    End


Group


Member Title


Location


WWW


Interests

Found 3 results

  1. Hi all. Today I would like to introduce the beginning of the UDF. How to get started: http://winscp.net/eng/docs/library http://winscp.net/eng/docs/library_install Original readme_automation.txt: now I have only one function (standard FTP on standard port) to show the future possibilities: Local $oErrorHandler = ObjEvent("AutoIt.Error", "_ErrFunc") Const Enum _ $__eWSCP_SO_Protocol_Sftp, _ $__eWSCP_SO_Protocol_Scp, _ $__eWSCP_SO_Protocol_Ftp Const Enum _ $__eWSCP_TO_TransferMode_Binary, _ $__eWSCP_TO_TransferMode_Ascii, _ $__eWSCP_TO_TransferMode_Automatic Example_PutFile('YOUR FTP HOST NAME', 'YOUR USER NAME', 'YOUR PASSWORD') Func Example_PutFile($sHostName, $sUserName, $sPassword) Local $sFileFullPath = StringReplace(@ScriptFullPath, '\', '\\') Local $sFilesToPut = StringReplace(@ScriptDir & '\*.au3', '\', '\\') ; based on: ; http://winscp.net/eng/docs/library_com_wsh#vbscript Local $oSessionOptions = ObjCreate("WinSCP.SessionOptions"); With $oSessionOptions .Protocol = $__eWSCP_SO_Protocol_Ftp .HostName = $sHostName; .UserName = $sUserName; .Password = $sPassword; ; below not jet tested ; .SshHostKeyFingerprint = "ssh-rsa 2048 xx:xx:xx:xx:xx:xx:xx:xx:xx:xx:xx:xx:xx:xx:xx:xx" EndWith Local $oSession = ObjCreate("WinSCP.Session"); With $oSession ; Connect: Open sesion with defined options .Open($oSessionOptions); ; Set TransferOptions Local $oTransferOptions = ObjCreate("WinSCP.TransferOptions") $oTransferOptions.TransferMode = $__eWSCP_TO_TransferMode_Binary ; Upload files: put @ScriptFullPath to the ROOT directory Local $oTransferResult = .PutFiles($sFilesToPut, '/'); ; Throw on any error $oTransferResult.Check ; Print results For $oTransfer In $oTransferResult.Transfers ConsoleWrite("Upload of " & $oTransfer.FileName & " succeeded" & @CRLF) Next ;' Disconnect, clean up .Dispose() EndWith ; CleanUp $oSession = '' $oSessionOptions = '' EndFunc ;==>Example_PutFile Func _ErrFunc($oError) ; Do anything here. ConsoleWrite(@ScriptName & " (" & $oError.scriptline & ") : ==> COM Error intercepted !" & @CRLF & _ @TAB & "err.number is: " & @TAB & @TAB & "0x" & Hex($oError.number) & @CRLF & _ @TAB & "err.windescription:" & @TAB & $oError.windescription & @CRLF & _ @TAB & "err.description is: " & @TAB & $oError.description & @CRLF & _ @TAB & "err.source is: " & @TAB & @TAB & $oError.source & @CRLF & _ @TAB & "err.helpfile is: " & @TAB & $oError.helpfile & @CRLF & _ @TAB & "err.helpcontext is: " & @TAB & $oError.helpcontext & @CRLF & _ @TAB & "err.lastdllerror is: " & @TAB & $oError.lastdllerror & @CRLF & _ @TAB & "err.scriptline is: " & @TAB & $oError.scriptline & @CRLF & _ @TAB & "err.retcode is: " & @TAB & "0x" & Hex($oError.retcode) & @CRLF & @CRLF) EndFunc ;==>_ErrFunc EDIT: 2014-06-20 04:47 - script changed
  2. I would like to control SFTP.EXE via the RUN command. If I solve the problem with SEND commands, I can get SFTP.EXE. But when I work with the RUN command. SFTP.EXE is not found. What am I doing wrong? Here is a test script: $host = "u76297179@home515426626.1and1-data.host" ;~ First, here's the proof that SFTP.EXE works. Send('#xi') ; call CMD window Sleep(200) Send('sftp.exe ' & $host & '{enter}') ; call SFTP Sleep(500) Send('nopass{enter}') ; enter an invalid Password For $i = 1 To 4 Send('{enter}') ; enter an null Password Sleep(1500) Next ;~ Now try with the RUN command ;~ Why is SFTP.EXE not found? $rc = Run(@ComSpec & " /k sftp.exe " & $host) ConsoleWrite("Error: " & @error & " Extended: " & @extended & " Line: " & @ScriptLineNumber & " RC: " & $rc & @LF) Output of SEND: Microsoft Windows [Version 10.0.19044.1320] (c) Microsoft Corporation. Alle Rechte vorbehalten. C:\Users\xxx>sftp.exe u76297179@home515426626.1and1-data.host u76297179@home515426626.1and1-data.host's password: Permission denied, please try again. u76297179@home515426626.1and1-data.host's password: Permission denied, please try again. u76297179@home515426626.1and1-data.host's password: u76297179@home515426626.1and1-data.host: Permission denied (publickey,password). Connection closed C:\Users\xxx> Output of RUN: Der Befehl "sftp.exe" ist entweder falsch geschrieben oder konnte nicht gefunden werden. C:\Users\xxx\Documents\Data\Autoit> Google translation: The command "sftp.exe" is either misspelled or could not be found. C: \ Users \ xxx \ Documents \ Data \ Autoit> Why is SFTP.EXE not found?
  3. I have started using this UDF SFTPEx.au3 to download a bunch of files from a remote server to local. First, Great job with the UDF and this really works! awesome work Lupo73... Second, there is no timestamps on the listed files when I use the function _SFTP_ListToArrayEx. Screenshots attached Third, Is the _SFTP_ProgressDownload function still Work in Progress? I am using the version 1.0 beta 9 using _ArrayDisplay function using Filezilla Can the developers please help me with these questions?
×
×
  • Create New...