Posted: 2010-11-12 22:28
I have simple web page which startup the batch file:
MyObject = new ActiveXObject( "WScript.Shell" )
var filename = "test2.txt";
var logfile = "wscplogfile.txt";
var obj = "file:///d:/Download/winscp/wscp.bat "+filename+" "+logfile+"";
<h1>Run a Program</h1>
<button onclick="RunExe()">Run Exe File</button>
in my wscp.bat there is:
d:\Download\winscp\winscp.exe ge /console /script=d:/Download/winscp/skrypt.txt %1 /log=d:/%2
and unfortunately it doesn't work.
The log file is creating everytime but in this log file there is a section:
< 2010-11-12 22:08:43.490 Script: Active session:  ge
> 2010-11-12 22:08:43.490 Script: option confirm off
< 2010-11-12 22:08:43.490 Script: confirm off
> 2010-11-12 22:08:43.491 Script: get %1 d:\
. 2010-11-12 22:08:43.492 Listing file "%1".
why this doesn't work for a filename?
how I can pass the variable filename from my webpage into the skrypt.txt file
Posted: 2010-11-12 22:31
the skrypt.txt file looks like this:
option confirm off
get %1 d:\
Location: Prague, Czechia
Should be put %1% ...
Posted: 2010-11-15 14:01
Thanks for the response.
I managed do do it by generating skrypt.txt file by webpage.
This is better sollution because only webpage knows what will be the file name.
You can post new topics in this forum
And it's free!