Post a reply

Before posting, please read how to report bug or request support effectively.

Bug reports without an attached log file are usually useless.

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: My scheduled task in windows for WinSCP is not running

nightguy wrote:

My scheduled task in windows is not able to run and giving me the Last Result is 0x1
RUN: "C:\Program Files (x86)\WinSCP3\WinSCP3.exe" /console /script=MoveBackup.txt
Start in: "C:\Program Files (x86)\WinSCP3"

However, I successfullu ran this command on Command Prompt but not Window Schedule Task.

Have you read FAQ?
nightguy

My scheduled task in windows for WinSCP is not running

My scheduled task in windows is not able to run and giving me the Last Result is 0x1
RUN: "C:\Program Files (x86)\WinSCP3\WinSCP3.exe" /console /script=MoveBackup.txt
Start in: "C:\Program Files (x86)\WinSCP3"

However, I successfullu ran this command on Command Prompt but not Window Schedule Task.

Please advice.
adrian_vg

Re: Simple download from linux webserver to windows client

Worked like a charm! Turns out it was simpler than anticipated... 8-]

I used the below for script.txt:
call cp /var/log/httpd/webserver_access_log /tmp/webserver_access_log.`date +%F`.unique
get /tmp/*.unique *.log
exit

In windows it produces a file "webserver_access_log.2006-08-22.log". Paired with a proper association for the .log-extension eg Notepad will be used to open it.

Thx for a great piece of software!
adrian_vg

Re: Simple download from linux webserver to windows client

Ok, thx. Will look into that.
martin

Re: Simple download from linux webserver to windows client

WinSCP does not support this natively. You may use remote-side scripting, as shown in examples.
adrian_vg

Simple download from linux webserver to windows client

Just want to do a simple log-download from a linux webserver to a windows client and rename the local file to include a YYYY-MM-DD date.

So far I have a script file containing (script.txt):

rem get /var/log/httpd/webserver_access_log C:\logs\*_%date%.log
rem get /var/log/httpd/webserver_access_log C:\logs\*_'date +%F%'.log
get /var/log/httpd/webserver_access_log C:\logs\*+%F.log
exit

and a scheduled task in windows, running the cmd-file containing the below line:

winscp3.exe user@webserver.domain.local /console /script=C:\logs\script.txt

The file downloads properly, but the rename fails on the windowss side, it just adds some weird looking thing, something like "webserver_access_log_%25date%25.log.

I don't have php or any scripting languange installed in windows, and would prefer leaving it that way. A simple download and rename is all I want - When the log is there in windows, I'm passing it to Analog to create some nice stats, again in windows.

It's rather obvious I'm missing something somewhere, so pls, if anybody could hint me or so, I'd be very grateful!

TIA.