Ok so you cannot run
Code: Select all
C:\Cumulus>winscp.exe /console /script="C:\cumulus\sftp-cmds.txt" /log="C:\Cumulus\winscp.log" /loglevel=2
since winscp does not reside in C:\Cumulus
in your sftp.bat file create the following lines:
Code: Select all
@echo off
cd "C:\Program Files\WinSCP"
winscp.exe /console /script="C:\cumulus\sftp-cmds.txt" /log="C:\Cumulus\winscp.log" /loglevel=2
This will mean you can run that batch file from anywhere on your C: drive and it will change directory to where WinSCP is and run that command.
now before we run this sftp.bat we need to bring up a command prompt window and "test" the commandline is correct.
bring up your "run" field (Windows Key + R)
type in "cmd" (without quotes)
a dos prompt window will appear, showing you a prompt and the directory you are in. most likely windows/system32 or something like that.
type the following.
cd C:\Program Files\WinSCP <enter key>
you now should be in the WinSCP folder where winscp.exe and winscp.com are.
type:
dir
this will list the files and folder within that folder.
the type in the winscp.exe command line exactly as it is in the sftp.bat
Code: Select all
winscp.exe /console /script="C:\cumulus\sftp-cmds.txt" /log="C:\Cumulus\winscp.log" /loglevel=2
this will hopefully show output. what output do you get?
btw my Winscp is installed in "C:\Program Files (x86)\WinSCP" so if you dont find winscp.com or winscp.exe first of all change to that folder instead.
let me know how you get on.
if no output, then you need to read the C:\Cumulus\winscp.log file
meteozusterhof wrote:Tried your suggestions: nothing seems to happen. No logfiles generated either.
winscp is in C:\Program Files\WinSCP
with the winscp.exe version in the bat file I see a DOS screen pop-up for a while (second or 5), displaying the line from the bat file, when manually running the bat file.
With the winspc.com version in the bat file, I see very briefly flash a DOS window but too brief to read.
When leaving it to Cumulus, I see nothing at all happening.
EDIT: the line shown in the DOS box is actually not that in the bat file, but:
Code: Select all
C:\Cumulus>winscp.exe /console /script="C:\cumulus\sftp-cmds.txt" /log="C:\Cumulus\winscp.log" /loglevel=2