Topic "Mirroring Questions From a Newbie"

Author Message
n8chavez
[View user's profile]

Joined: 2011-03-26
Posts: 2
I just discovered WinSCP, and I like it a lot. I have having trouble finding out how to write a script that I can autostart with windows that I can automate mirroring between several directories I have stored locally and and FTP server. Is that even possible? I have searched the forum as much as I could and looked at the scripting self-help pages but I was unable to find anything. I am even having trouble creating a shortcut to winspc.com, and I can't have it point to a script at all if I can't do that; when I try it says that the disk is full. Oddly enough, I can copy the file without issue. If anyone would help me, or even point me to where I can find any relevant information, I'd appreciate it.

Thank you.
n8chavez
[View user's profile]

Joined: 2011-03-26
Posts: 2
I was able to do a few things myself. I can use the below bat to sync a directory.

Quote:
C:\Progra~1\WinSCP\WinSCP /command "option batch on" "option confirm off" "open ftp://user:pass*@server -timeout=180" "synchronize remote D:\Documents /Mine/Documents" "exit"


These will be run manually.

I can do something like this to monitor directories, and the changes are uploaded nearly as the directory changes.

Quote:
C:\Progra~1\WinSCP\WinSCP /command "option batch on" "option confirm off" "open ftp://user:pass*@server -timeout=180" "keepuptodate D:\School /Mine/School"


I plan on adding the latter script to startup, that way I don't have any question whether or not changes are uploading. And, if I use this vbs script and point to the bat I plan on adding to boot I'll get no annoying prompts or windows.

Quote:
Set WshShell = CreateObject("WScript.Shell")
WshShell.Run chr(34) & "bat file" & Chr(34), 0
Set WshShell = Nothing


I do have a question though. Is it possible to use the keepuptodate command with multiple corresponding local and remote directories? Is so, how? I'd like to monitor more than one directory, yet only have once instance on WinSCP.com running.
martin
[View user's profile]
Site Admin
Joined: 2002-12-10
Posts: 25015
Location: Prague, Czechia
n8chavez wrote:
I do have a question though. Is it possible to use the keepuptodate command with multiple corresponding local and remote directories? Is so, how? I'd like to monitor more than one directory, yet only have once instance on WinSCP.com running.

Only by synchronizing common root directory and excluding the subdirectories you do not want to synchronize. Or by running multiple instances of WinSCP.
_________________
Martin Prikryl
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