Topic "Need a persistent "Keep remote directory up to date" setup"

Author Message
kenatsun
[View user's profile]

Joined: 2009-01-08
Posts: 3
WinSCP's "Keep remote directory up to date" feature is just what I need to enable me to edit code on my Windows machine and automatically update changed files to my test environment on a Linux server.

But there are two killer problems when I set up an automatic update using the GUI (see screen shots in attached doc1.doc):

1. The dialog box is modal: Once I set up the automatic sync and hit "Start", the WinSCP GUI is locked up so I can't do anything else in the GUI until I hit "Stop" (which terminates the automatic copying) and then "Close".

2. Worse, when I close the dialog box, then the whole automatic update setup is lost. If I want the same automatic copy to happen again, I have to enter it all over again.

So is there any way to save a "Keep remote directory up to date" setup so it persists and, preferably, automatically restarts whenever I open this particular WinSCP saved session? I'd prefer to do it thru the GUI, so I don't have to learn the WinSCP scripting language, but if scripting is the only way to get this functionality, I'm willing to do it.

~ Thanks!
~ Ken
Doc1.doc (151 KB) [Download]

Description: (none)

Advertisements
martin
[View user's profile]
Site Admin
Joined: 2002-12-10
Posts: 24512
Location: Prague, Czechia
kenatsun wrote:
2. Worse, when I close the dialog box, then the whole automatic update setup is lost. If I want the same automatic copy to happen again, I have to enter it all over again.

What setup do you mean?
I see you have Use same options next time ticked already.
Do you mean transfer settings? You can make a preset for these.
http://winscp.net/eng/docs/transfer_settings
Startup directoies?
You can make a location profile for it
http://winscp.net/eng/docs/ui_locationprofile

Also what prevents you from running two instances of WinSCP?

Quote:
So is there any way to save a "Keep remote directory up to date" setup so it persists and, preferably, automatically restarts whenever I open this particular WinSCP saved session? I'd prefer to do it thru the GUI, so I don't have to learn the WinSCP scripting language, but if scripting is the only way to get this functionality, I'm willing to do it.

Depends on what you want to setup.

If just start directories, you can do with just /keepuptodate command line switch:
http://winscp.net/eng/docs/commandline#operations

If you need more, scripting is a way to go
http://winscp.net/eng/docs/scriptcommand_keepuptodate
_________________
Martin Prikryl
ngmunfye
[View user's profile]

Joined: 2012-12-17
Posts: 8
I currently used WinSCP Version 5.1.2 both GUI/Window Batch Script

I store a session in ini file and used it call from my batch script to do Keepuptodate features.

First Problem: I have configured Option Batch On, so that if error will skip it, my Keepuptodate commands will always monitor and running. But I want to handle If folder exists in Remote directory no need to mkdir. If fail to detect errorlevel if Option Batch are set to On. No matter which method in approaches (such as If errorlevel 1 goto error, If exist folder path do keeuptodate else mkdir only). The result always call mkdir because it cannot detect the errorlevel neither if folder exist in remote path.

Second Problem: I noticed that WinSCP GUI can open multiple sessions at 1 Winscp GUI screen, but if you are doing Keep Remote directory up to date features..It will only work at 1 session at a time. I believe it will be the same if you apply to scripting. Winscp does support up to 9 session transfer at background, is that not support for Keepuptodate features?
martin
[View user's profile]
Site Admin
Joined: 2002-12-10
Posts: 24512
Location: Prague, Czechia
ngmunfye wrote:
First Problem: I have configured Option Batch On, so that if error will skip it, my Keepuptodate commands will always monitor and running. But I want to handle If folder exists in Remote directory no need to mkdir. If fail to detect errorlevel if Option Batch are set to On. No matter which method in approaches (such as If errorlevel 1 goto error, If exist folder path do keeuptodate else mkdir only). The result always call mkdir because it cannot detect the errorlevel neither if folder exist in remote path.

Can you please try again? I'm afraid, I do not understand. Thanks.

Quote:
Second Problem: I noticed that WinSCP GUI can open multiple sessions at 1 Winscp GUI screen, but if you are doing Keep Remote directory up to date features..It will only work at 1 session at a time. I believe it will be the same if you apply to scripting. Winscp does support up to 9 session transfer at background, is that not support for Keepuptodate features?

The scripting simply does not support concurrent operations.
The support for multiple sessions is useful for interactive use, not that much for batch use.
ngmunfye
[View user's profile]

Joined: 2012-12-17
Posts: 8
First Problem: I want to know how to check remote folder exist before I issue mkdir command. the scripting are inside winscp, example shown at **. It does not working, mean it always create a folder no matter exist or not.

ECHO option batch on
ECHO option confirm off
ECHO open %session%
ECHO option transfer binary
**IF FOLDER EXIST GOTO MAKE_DIR
ECHO keepuptodate %monitor_path%" -delete -filemask="*.rle,*.res,*.log,*.tar|*.txt"
**MAKE_DIR
**MKDIR %COMPUTERNAME%
ECHO exit
martin
[View user's profile]
Site Admin
Joined: 2002-12-10
Posts: 24512
Location: Prague, Czechia
ngmunfye wrote:
First Problem: I want to know how to check remote folder exist before I issue mkdir command. the scripting are inside winscp, example shown at **. It does not working, mean it always create a folder no matter exist or not.

Please read documentation:
http://winscp.net/eng/docs/script_checking_file_existence
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