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

JRB_BMB

The quotes encapsulate the command into a single string that the program can use and doesn't count them all as little chunks.
So it sees;
open mharper@192.168.166.29
get test c:\test_bat

and not;
open
mharper@192.168.166.29
get
test
c:\test_bat

Hope that makes sense.
hunter

Re: automation and scripting

martin wrote:

hunter wrote:

C:\WinSCP.exe /log /console /wait /open mharper@192.168.166.29 /get test c:\test_bat

You probably meant to do:
c:\winscp.exe /log=c:\winscp.log /console /command "open mharper@192.168.166.29" "get test c:\test_bat"

There is no "wait" command in WinSCP. Where did you find that?


actually it all works the file test_bat was a typo on my part and it created a new folder with that name. I added an exit to the scheduler and all is well. I will be trying it on a batch file next and it looks good.

The one thing that I would like to understand is the quotes and what do they do?


Thanks so much for your help.

Mark 8)
Guest

Re: automation and scripting

Anonymous wrote:

martin wrote:

hunter wrote:

C:\WinSCP.exe /log /console /wait /open mharper@192.168.166.29 /get test c:\test_bat

You probably meant to do:
c:\winscp.exe /log=c:\winscp.log /console /command "open mharper@192.168.166.29" "get test c:\test_bat"

There is no "wait" command in WinSCP. Where did you find that?


what do the quotes do? the wait is a dos command that seemed the only way for the actual batch file to get logged into the session.
I will apply those changes and see what happens.


Mark :D


OK its almost there. I ran the scheduler with the changed paramters but it is trying to pull binaries. and not file is transfered. I am only moving text files is there an adjustment I can use to get that to happen?
Guest

Re: automation and scripting

martin wrote:

hunter wrote:

C:\WinSCP.exe /log /console /wait /open mharper@192.168.166.29 /get test c:\test_bat

You probably meant to do:
c:\winscp.exe /log=c:\winscp.log /console /command "open mharper@192.168.166.29" "get test c:\test_bat"

There is no "wait" command in WinSCP. Where did you find that?


what do the quotes do? the wait is a dos command that seemed the only way for the actual batch file to get logged into the session.
I will apply those changes and see what happens.


Mark :D
martin

Re: automation and scripting

hunter wrote:

C:\WinSCP.exe /log /console /wait /open mharper@192.168.166.29 /get test c:\test_bat

You probably meant to do:
c:\winscp.exe /log=c:\winscp.log /console /command "open mharper@192.168.166.29" "get test c:\test_bat"

There is no "wait" command in WinSCP. Where did you find that?
hunter

automation and scripting

I am trying to automate winscp. I am able to verify manually in DOS that the commands work. but as a batch file or from the scheduler I get left at the

active session: [1] mharper@192.168.166.29
winscp>

At the winscp prompt I can manually get my files but not able to automate that part of the process.

Also I am not able to get the log to create.


C:\WinSCP.exe /log /console /wait /open mharper@192.168.166.29 /get test c:\test_bat


As a batch file it seems that the wait is needed to get the login to work but from the scheduler it runs ok with out the wait.

What I am trying to do is get files from a remote server and completely automate the process on an hourly basis. I have tried many variations nothing seems to work.

all my commands work from the Command line but fail after logging into the server.


Mark :( [/b]