+ Reply to Thread
Results 1 to 3 of 3

Problem uploading file to sftp

Hybrid View

Eliot Y Problem uploading file to sftp 05-19-2015, 07:30 AM
Kyle123 Re: Problem uploading file to... 05-19-2015, 07:33 AM
Kyle123 Re: Problem uploading file to... 05-19-2015, 08:21 AM
  1. #1
    Registered User
    Join Date
    12-25-2014
    Location
    Jerusalem
    MS-Off Ver
    XP
    Posts
    23

    Problem uploading file to sftp

    Hi,

    I am trying to upload file to sftp using this code:

    Public Sub SftpPut()
    Const cstrSftp As String = """C:\Putty\pscp.exe"""
    Dim strCommand As String
    Dim pUser As String
    Dim pPass As String
    Dim pHost As String
    Dim pFile As String
    Dim pRemotePath As String

    pUser = "username"
    pPass = "Password"
    pHost = "host.com"
    pFile = "C:\Users\Worker\Pictures\diamonds_jewelry\not on ftp\360\227\images\227_01.jpg"
    pRemotePath = "/360/"


    strCommand = cstrSftp & " -sftp -l " & pUser & " -pw " & pPass & _
    " " & pFile & " " & pHost & ":" & pRemotePath

    Debug.Print strCommand
    Shell strCommand, 1 ' vbNormalFocus '

    End Sub

    I assume there is a connection but the file hasn’t arrived to the sftp. What would you recommend me to do?

  2. #2
    Forum Guru Kyle123's Avatar
    Join Date
    03-10-2010
    Location
    Leeds
    MS-Off Ver
    365 Win 11
    Posts
    7,239

    Re: Problem uploading file to sftp

    That isn't the PSFTP syntax - the documentation is here, http://the.earth.li/~sgtatham/putty/.../Chapter6.html

    Also

    Your post does not comply with Rule 3 of our Forum RULES. Use code tags around code.

    Posting code between [CODE] [/CODE] tags makes your code much easier to read and copy for testing, it also maintains VBA formatting.

    Highlight your code and click the # icon at the top of your post window. More information about these and other tags can be found here



    (This thread should receive no further responses until this moderation request is fulfilled, as per Forum Rule 7)

  3. #3
    Forum Guru Kyle123's Avatar
    Join Date
    03-10-2010
    Location
    Leeds
    MS-Off Ver
    365 Win 11
    Posts
    7,239

    Re: Problem uploading file to sftp

    Also:
    Your post does not comply with Rule 8 of our Forum RULES. Do not crosspost your question on multiple forums without including links here to the other threads on other forums.

    Cross-posting is when you post the same question in other forums on the web. The last thing you want to do is waste people's time working on an issue you have already resolved elsewhere. We prefer that you not cross-post at all, but if you do (and it's unlikely to go unnoticed), you MUST provide a link (copy the url from the address bar in your browser) to the cross-post.

    Expect cross-posted questions without a link to be closed and a message will be posted by the moderator explaining why. We are here to help so help us to help you!

    Read this to understand why we ask you to do this, and then please edit your first post to include links to any and all cross-posts in any other forums (not just this site).

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. Downloading file from SFTP
    By paulzov in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 01-25-2018, 05:20 PM
  2. problem in uploading file
    By kmahesh in forum Excel General
    Replies: 8
    Last Post: 12-15-2014, 02:19 AM
  3. Problem uploading file using Windows 8?
    By Aland2929 in forum Excel General
    Replies: 0
    Last Post: 02-05-2013, 11:16 AM
  4. [SOLVED] How to allow the user to choose the file when uploading a file using a Macro
    By SarahB2 in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 06-14-2012, 03:09 PM
  5. Problem uploading file to thread
    By ddub25 in forum Excel General
    Replies: 1
    Last Post: 06-29-2009, 09:03 PM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1