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: Previously working script not working anymore

We need to know more about "not working anymore". What does it do? Can you please post the script passwd_upload.log log file too?
jhs1

Previously working script not working anymore

Here is my script which I run from a cmd prompt in Windows, it first prompts for the web site password then uploads 1 file:
@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: