Topic "some advice please"

Author Message
zen200
[View user's profile]

Joined: 2015-12-24
Posts: 4
Location: Kent
This is my first attempt and will be putting this into a windows scheduled task to run nightly.

Will this work ?


Program/script
:
"C:\Program Files (x86)\WinSCP\WinSCP.exe"

Add Argument:
/command "open ftp://user:password@remoteipaddress/" "synchronize local C:\localfolder /remotefolder" "exit"

Thanks

Phil
Advertisements
martin
[View user's profile]
Site Admin
Joined: 2002-12-10
Posts: 24553
Location: Prague, Czechia
Seems good.

I'd just add /log=c:\path\to\winscp.log to enable logging.
Guest




prikryl wrote:
Seems good.

I'd just add /log=c:\path\to\winscp.log to enable logging.


Thanks for the advice.

I haven't managed to get my above setup working for some reason.

I can get the program to open if I remove the argument, nothing happens when I put the argument back in though.

I must be doing something wrong.

This is on a server 2008r2 does that make any difference ?

Thanks for any help.
zen200
[View user's profile]

Joined: 2015-12-24
Posts: 4
Location: Kent
So the below does NOT work when put into the windows schedule task.

Program/script:
"C:\Program Files (x86)\WinSCP\WinSCP.exe"

Add Argument:
/command "open ftp://user:password@remoteipaddress/" "synchronize local C:\localfolder /remotefolder" "exit"


So I have turned to testing in the command prompt in windows 2008 r2, and have put the following in.

"C:\Program Files (x86)\WinSCP\WinSCP.exe" ftp://USER:PASSWORD@IPADDRESS/


This is the only way that I have been able to get winscp to open, connect and logged in. but I am unable to get the correct folders to open up automatically and then sync.

Please help, as I have been on this for days now.

[b]This is what I am needing to get working.[/b]

synchronize local C:\OLD SXE DB BACKUP /app/report/db
zen200
[View user's profile]

Joined: 2015-12-24
Posts: 4
Location: Kent
This works in command prompt on windows 2008 R2, but not in windows task schedule... Any ideas why ?

"C:\Program Files (x86)\WinSCP\WinSCP.com" /script=c:\scripts\script.txt

[b]SCRIPT FILE CONTENTS[/b]

open ftp://USER:PASSWORD@SERVERIP/
synchronize local C:\LOCALFOLDER /app/report/db
exit


Thanks

Phil
zen200
[View user's profile]

Joined: 2015-12-24
Posts: 4
Location: Kent
New Morning New Start.

So i decided to go out and have a nice drink and meal last night and to let my hair down.

I woke up with a fuzzy head and then sat in front of the pc once again to tackle this seemingly difficult task of getting task manager to work.

I looked at what I had left the settings at yesterday, and couldnt work out what I had done. So I started again from scratch and I got it working first time :shock:

So to clarify this is exactly what I did and hope it helps others.

Put the below into windows task schedule:

[b]Program/script:[/b]
"C:\Program Files (x86)\WinSCP\WinSCP.com"

[b]Add Argument:[/b]
/script=c:\scripts\script.txt /log="c:\scripts\logs.log"

---------------------------------------------------

Make a script as below and save it in the location c:\scripts\script.txt

[b]script.txt content [/b]

open ftp://USER:PASSWORD@SERVERIP/
synchronize local C:\LOCALFOLDER REMOTEFOLDER
exit

-------------------
replace the capitals with your own details.

Thats it i think.

Good luck
martin
[View user's profile]
Site Admin
Joined: 2002-12-10
Posts: 24553
Location: Prague, Czechia
Thanks for sharing your solution.
Advertisements

You can post new topics in this forum






Search Site

What is WinSCP?

It is award-winning SFTP client, SCP client, FTPS client and FTP client integrated into one software program for file transfer to FTP server or secure SFTP server. [More]

And it's free!

Donate

About donations

$9   $19   $49   $99

About donations

Recommend

WinSCP Privacy Policy

WinSCP License