sftp was deactivated on my site for some reason. I have to use ftp for now. I modified the script and it is working now.
- jhs1
passwd_upload.log log file too?
@echo off
setlocal enableextensions enabledelayedexpansion
set /P password=Enter website pwd or Enter to quit:
IF %password% == "" exit
cls
set log_filename=passwd_upload.log
del %log_filename%
echo Starting WinSCP
"C:\Program Files (x86)\WinSCP\WinSCP.com" /log=%log_filename% /ini=nul /command "open ftp://xxx:"%password%"@ftp.xxx.com:21/ -hostkey=""ssh-ed25519 255 yyyyyyyyy"" -rawsettings FSProtocol=2" ^
"put ""C:\file"" ""/home/xxx/file""" ^
"exit"
echo WinSCP finished
set /P exit_bat=Hit any key to quit: