Topic "Option to always create directory when Synchronized Browsing"

Author Message
adam
[View user's profile]

Joined: 2014-07-21
Posts: 5
Current behavior:
When synchronized browsing is turned on, and an attempt to access a remote folder not present on local. Option is given to create the directory.

[Confirm]
Do you want to try to create directory 'C:\foo\bar\'?
Cannot open corresponding directory in the opposite panel.
Directory 'C:\foo\bar' doesn't exist.
[Yes][No][Help]

Desired behavior:
Option to always choose "Yes"

The alternate behavior of always choosing "No" is already filed at http://winscp.net/tracker/show_bug.cgi?id=631
Advertisements
martin
[View user's profile]
Site Admin
Joined: 2002-12-10
Posts: 24555
Location: Prague, Czechia
Thanks for your suggestion. Will see if more people ask for this.
_________________
Martin Prikryl
adam
[View user's profile]

Joined: 2014-07-21
Posts: 5
prikryl wrote:
Thanks for your suggestion. Will see if more people ask for this.


If anyone is looking for an immediate solution, you can hack a solution with open source AutoHotKey.

Just create a text file with extension .ahk and run with portable AutoHotKey
Following code runs an infinite loop
Note the window title and ahk_class used within the program are not unique to WinSCP so every 10 minutes loop checks whether WinSCP window is still open
Code:
; Program: WinSCP
; Issue: Sychronized Browsing - Always "Yes"
; Workaround:
;   1. Wait for WinSCP commander interface window to exist
;   2. Wait for confirmation prompt for creating local folder
;   3. "Click" Yes

DetectHiddenText, off  ;will not search hidden window text (faster)
DetectHiddenWindows, off  ;will not detect hidden windows (faster)

Loop {  ;continue indefinitely

; WinWait* is event-driven hook implementation consuming 0% cpu while process is stored in RAM
; WinTitle=Confirm AND ahk_class=TMessageForm AND Text=&Yes is not unique to WinSCP, so minimize interference by at least wait indefinitely until WinSCP Commander window exists
WinWait, ahk_class TScpCommanderForm 

; Wait until confirm prompt window exists and has focus where WinTitle=Confirm and ahk_class=TMessageForm
; Every 10 minutes checks if WinSCP Commander GUI is still running
WinWaitActive, Confirm ahk_class TMessageForm, &Yes, 600 

; Default answer is Y, therefore "Send {Enter}" would work, also "Send y"
; For accuracy, we will press specific mapped button of matched window in case focus was lost (such as may happen with mouseover-focus and zero focus-delay)
; TMessageButton3=&Yes TMessageButton2=&No TMessageButton1=&Help
ControlSend, TMessageButton3, {Enter}, ahk_class TMessageForm 
}
}
martin
[View user's profile]
Site Admin
Joined: 2002-12-10
Posts: 24555
Location: Prague, Czechia
Thanks for sharing your solution!
_________________
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