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.
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.
Still, this would not upload "New/Updated files only". You should better use "synchronize remote" instead of "put"
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:
option batch on
option confirm off
put -resume %2%\%3%
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://firstname.lastname@example.org /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.