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: Need to transfer XML file on Sftp server

vishal marne wrote:

i need to upload xml file on secure FTP location using winscp.com. it is a backend activity it should get executed in Timer Job.How i can achive this.

Please read documentation:
https://winscp.net/eng/docs/guide_schedule
vishal marne

Need to transfer XML file on Sftp server

Hi prikryl,

i need to upload xml file on secure FTP location using winscp.com. it is a backend activity it should get executed in Timer Job.How i can achive this.
jsherk

Oh yeah, that would be better.

And it appears that I do need the "option batch" or "option confirm" when doing this either, as that would implied.

Thanks
martin

Still, this would not upload "New/Updated files only". You should better use "synchronize remote" instead of "put"
jsherk

Well I am not sure when the correct place to use winscp.exe versus winscp.com but this is what I ended up doing, which seems to work:

From the DOS command line I call:
winscp.com /script=myscript.txt /parameter "path/to/remoteDir" "path\to\localDir" "localFilname"

myscript.txt looks like this:
open sftp://user@mydomain.com
cd %1%
option batch on
option confirm off
put -resume %2%\%3%
exit
jsherk

Command Line usage- default response

Hi

I am writing a DOS batch file that will upload a specific file to the remote server. I can call the batch file and the following line successfully runs:
winscp.exe sftp://user@mydomain.com /home/domain/dir/ /upload c:\dir\myfile.txt

The problem I have is that I want to automate the script for unattended automation but it will open the gui window and prompt me to select/check the box marked "New/Updated files only" and then I have to click the "Copy" button.

I have been reading the docs, and tried /defaults and using winscp.com but I must be missing something because I cannot figure out how to automatically tell it that I want "New/Updated files only" CHECKED and then to go ahead and automatically copy.

Any help or suggestions appreciated.

Thanks