Batch file
Good day and happy holiday.
I'm using WinSCP as a client sending a .csv file to an SFTP server. I can do it manual and would like to create a batch file to automatically do it via Windows Task Schedule. I've used the WinSCP to create the batch but am having a hard time to figure out how to do the actual batch file transfer.
This is what I have that isn't working.
Basically from what I understand, the
Thanks for any light on this
I'm using WinSCP as a client sending a .csv file to an SFTP server. I can do it manual and would like to create a batch file to automatically do it via Windows Task Schedule. I've used the WinSCP to create the batch but am having a hard time to figure out how to do the actual batch file transfer.
This is what I have that isn't working.
Basically from what I understand, the
put
is sending down the file located on my PC (Client) to the server.
C:\Users\smith\Documents\519M-SCH\Test csv files\Monday*.*
– this is the location of the folder which contains the file.
C:\Temp\*.*
– this is the folder on the server which I want to send the .csv file too.
Thanks for any light on this
@echo off "C:\Program Files (x86)\WinSCP\WinSCP.com" ^ /log="C:\writable\path\to\log\WinSCP.log" /ini=nul ^ /command ^ "open sftp://UserNet:password1@100.600.602.24/ -hostkey=""ssh-ed25519 255 RYGpLKoNOadAyIIR671Botp3yYNa45od7YzkhHHip4AY""" ^ "put""C:\Users\smith\Documents\519M-SCH\Test csv files\Monday\*.*"" ""C:\Temp\*.*"""^ "exit" set WINSCP_RESULT=%ERRORLEVEL% if %WINSCP_RESULT% equ 0 ( echo Success ) else ( echo Error )