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

Blisk

thank you, now all works
martin

-neweronly and -resume are switches of the put command, not open.

So it's
put -neweronly -resume ...


Also when I download text file it loose lines.
All is in one line and it should be in 10 lines for example.

The file most probably has unix line endings, and you open it in a editor/viewer which does not support them (like Windows Notepad). You can add -transfer=ascii switch to fix that.
Blisk

Thank you, I have manage to make script to upload, but it doesn't
recognise any switch
when I put -neweronly -resume
it say
unknown switch "neweronly"
unknown switch "resume"

open sftp://username:password@192.168.333.191/ -passive=on -neweronly -resume -hostkey="ssh-rsa 2048 fc:16:80:99:38:ef:c6:7d:22:9a:23:59:17:93:9e:88"


Also when I download text file it loose lines.
All is in one line and it should be in 10 lines for example.
Blisk

Here is my uplod script, but don't know how to make it download?
On these links there is no download!

# Automatically abort script on errors
option batch abort
# Disable overwrite confirmations that conflict with the previous
option confirm off
# Connect
open sftp://username:password@192.168.333.191/ -passive=on -neweronly -hostkey="ssh-rsa 2048 fc:16:80:99:38:ef:c6:7d:22:9a:23:59:17:93:9e:88"
# Change remote directory
cd /archive/files
# Force binary mode transfer
option transfer binary
# Upload the file to current working directory
put D:\inf\dll\DVD
# Disconnect
close
# Exit WinSCP
exit
Blisk

Download files

how can I make a script to download files from remote server, to local server.
I have folders and subfolders and files in all of it and want exact copy to download to local server.
I know how to upload but can't download files and folders.
Can someone help me with this, please ?