Upload file and overwrite file via command line (batch script)
Hello,
I'm new with WinSCP and want to upload a file with command line (batch file) into a subdirectory of my SFTP server. When I start the script again the file should be overwritten.
The upload via batch file will be done successfully at the first start.
But when I start the batch file again, the file will not overwritten on my ftp.
What is wrong in my script:
open sftp://xxxxxx -hostkey="xxxxxxxx yy:yy...."
option confirm off
mkdir testdir
mkdir testdir/sub_test
put "myfile.txt" /testdir/sub_test/
close
exit
Hope anyone can help.
kind regards
I'm new with WinSCP and want to upload a file with command line (batch file) into a subdirectory of my SFTP server. When I start the script again the file should be overwritten.
The upload via batch file will be done successfully at the first start.
But when I start the batch file again, the file will not overwritten on my ftp.
What is wrong in my script:
open sftp://xxxxxx -hostkey="xxxxxxxx yy:yy...."
option confirm off
mkdir testdir
mkdir testdir/sub_test
put "myfile.txt" /testdir/sub_test/
close
exit
Hope anyone can help.
kind regards