Posted: 2015-09-29 21:11
Can anyone point me to a good step by step for someone who is completely new to scripting? I am trying to duplicate the script to download the most recent file jscript example. I have put in my information in the top section:
// Local path to download to (keep trailing slash)
var LOCALPATH = "c:\\sftptest\\";
// Remote path to search in (keep trailing slash)
var REMOTEPATH = "/in/";
// Mask of files to search for
var FILEMASK = "*.*";
// Session to connect to
var SESSION = "email@example.com";
// Path to winscp.com
var WINSCP = "c:\\program files (x86)\\winscp\\winscp.com";
I left everything else exactly the same.
I saved the file as sftp.js and put it both in the winscp program folder and on in the current directory on the sftp site. Then I opened my session in winscp, opened console and typed:
cscript /nologo sftp.js
I get an error "Command 'cscript /nologo sftp.js' failed with return code 127 and error message -bash: line 11: cscript:command not found.
What I am trying to do is to download the most recent file on the server, ultimately I want to create a batch file to do all this. I need a step-by-step guide please!
Location: Prague, Czechia
You have to run the
You can post new topics in this forum
And it's free!