Mirroring Questions From a Newbie

Advertisement

n8chavez
Joined:
Posts:
2

Mirroring Questions From a Newbie

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.

Reply with quote

Advertisement

n8chavez
Joined:
Posts:
2

I was able to do a few things myself. I can use the below bat to sync a directory.

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.

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.

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.

Reply with quote

martin
Site Admin
martin avatar
Joined:
Posts:
41,441
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.

Reply with quote

Advertisement

You can post new topics in this forum