I need SFTP to create remote directories via command line

Advertisement

unabletostay
Guest

I need SFTP to create remote directories via command line

Hi,

I'm using 5.1.3.0 via command line on a growing number of servers to backup a specific location. I'm using a Windows environmental variable %computername% so minimise customisation of the script per server.

I'm finding that when attempting to transfer to /%computername%/Data that because the /%computername% doesn't exist it fails. This makes sense and from my understanding this is by design. Is there however any switches I can use to change this so it does create the directory?

Script below:

winscp.com /log=log.txt /script=backupScript.txt

backupScript.txt

option batch abort
option confirm off
open username:password@server
synchronize remote -delete "E:\Data" "/%computername%/Data"
exit

Thanks in advance for your help. :)

Reply with quote

Advertisement

Advertisement

You can post new topics in this forum