Post a reply

Options
Add an Attachment

If you do not want to add an Attachment to your Post, please leave the Fields blank.

(maximum 10 MB; please compress large files; only common media, archive, text and programming file formats are allowed)

Options

Topic review

martin

Re: Help with put .bat

What "help" do you need?
meganb10578

Help with put .bat

@echo off
 
"C:\Program Files (x86)\WinSCP\WinSCP.com" ^
  /log="C:\WinSCP.log" /ini=nul ^
  /command ^
    "open sftp://sftpsite.com/ -hostkey=""ssh-rsa 1029 U7gTHqAEWWcc9s4RaafFus7Ijsdvqbd/3IS8Juih3ys="" -rawsettings FSProtocol=2" ^
    "lcd c:\Folderfiles" /ini=nul ^
    "cd /" ^
    "put file1.csv" ^
    "put file2.csv" ^
    "put file3.csv" ^
    "put file4.csv" ^
    "exit" ^
 
set WINSCP_RESULT=%ERRORLEVEL%
if %WINSCP_RESULT% equ 0 (
  echo Success
) else (
  echo Error
)
 
exit /b %WINSCP_RESULT%