Options

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

zen200

## REMOTE FOLDER SYNC TO LOCAL AND WINDOWS TASK SCHEDULER

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"

/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]

synchronize local C:\LOCALFOLDER REMOTEFOLDER
exit

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

Thats it i think.

Good luck
zen200
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]

synchronize local C:\LOCALFOLDER /app/report/db
exit

Thanks

Phil
zen200
So the below does NOT work when put into the windows schedule task.

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

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

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.

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

synchronize local C:\OLD SXE DB BACKUP /app/report/db
Guest

martin wrote:

Seems good.

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

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.
martin

Seems good.

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

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"