Sync Browse - auto create subfolder
-
- Posts: 6
- Joined: 09 Jun 2021 10:18
Sync Browse - auto create subfolder
Hi there.
I love the "Sync Browse" feature. Although i miss a way to automatically create a subfolder that i'm diving into, on the other side, if it doesn't exist. i have to first create the folder manually, then can continue sync-browsing. FileZilla has this feature and i use it all the time when just copying single files but keep complex folder structures intact on both sides.
Is this possible? Or is it possible to do via scripting? I'd appreciate any help.
thanks,
Moritz.
I love the "Sync Browse" feature. Although i miss a way to automatically create a subfolder that i'm diving into, on the other side, if it doesn't exist. i have to first create the folder manually, then can continue sync-browsing. FileZilla has this feature and i use it all the time when just copying single files but keep complex folder structures intact on both sides.
Is this possible? Or is it possible to do via scripting? I'd appreciate any help.
thanks,
Moritz.
Re: Sync Browse - auto create subfolder
It's possible via a script for Custom Event Actions - Changing Locations - After painting the file list
Set the action to "Run script" and in the script column use this:
This should work, although I've done only limited testing...
Set the action to "Run script" and in the script column use this:
Code: Select all
$syncBrowse = get("#814");
$dualPane = get("#800");
if ($syncBrowse && $dualPane) {
$aPaneFolders = listpane("a", , 2+4, <crlf>);
$iPaneFolders = listpane("i", , 2+4, <crlf>);
$aPaneMissing = formatlist($iPaneFolders, "F", <crlf>, "!$aPaneFolders");
$iPaneMissing = formatlist($aPaneFolders, "F", <crlf>, "!$iPaneFolders");
if ($aPaneMissing) {
$dstPath = get("path", "a");
foreach($folder, $aPaneMissing, <crlf>, "e") {
if (exists("$dstPath\$folder") != 2) {
new($dstPath . "\" . $folder, "dir");
// sysdebug "a: " . $dstPath . "\" . $folder;
}
}
refreshlist "a";
}
if ($iPaneMissing) {
$dstPath = get("path", "i");
foreach($folder, $iPaneMissing, <crlf>, "e") {
if (exists("$dstPath\$folder") != 2) {
new($dstPath . "\" . $folder, "dir");
// sysdebug "i: " . $dstPath . "\" . $folder;
}
}
refreshlist "i";
}
}
One of my scripts helped you out? Please donate via Paypal
-
- Posts: 6
- Joined: 09 Jun 2021 10:18
Re: Sync Browse - auto create subfolder
Thanks for the answer!
Although it's not quite what i had in mind. Your script creates all folders that don't exist on the other side after diving into a folder. What i'm looking for is a way to create a folder before i dive into it, if it doesn't exist on either side. Hope this explanation makes sense.
Although it's not quite what i had in mind. Your script creates all folders that don't exist on the other side after diving into a folder. What i'm looking for is a way to create a folder before i dive into it, if it doesn't exist on either side. Hope this explanation makes sense.
Re: Sync Browse - auto create subfolder
Nope. Give a real world example
One of my scripts helped you out? Please donate via Paypal
Re: Sync Browse - auto create subfolder
I'm guessing, but if moritz.glaesle would like only the selected folder in in one pane to be created in the other pane, that might make it easier to script.
Windows 11, 23H2 Build 22631.3447 at 100% 2560x1440
-
- Posts: 6
- Joined: 09 Jun 2021 10:18
Re: Sync Browse - auto create subfolder
real world example:
left pane shows folders A, B, C
right pane shows folders A, B
click on C in left pane to dive into it. before the dive, an empty folder C is created in the right pane, then both panes enter their folder C, so browsing is still in sync. left side shows content of folder C, right pane shows empty folder C.
thanks for your help guys.
left pane shows folders A, B, C
right pane shows folders A, B
click on C in left pane to dive into it. before the dive, an empty folder C is created in the right pane, then both panes enter their folder C, so browsing is still in sync. left side shows content of folder C, right pane shows empty folder C.
thanks for your help guys.
-
- Site Admin
- Posts: 62188
- Joined: 22 May 2004 16:48
- Location: Win8.1 @100%, Win10 @100%
- Contact:
Re: Sync Browse - auto create subfolder
I like and use FileZilla myself, so it cannot be such a bad idea. I checked it and saw that there is a prompt before anything happens:
Or would it be cooler to add a general option: Configuration | Tabs and Panes | Dual Pane | Sync Browse auto-creates any missing folder ?
XYplorer does not need the second option (the disabling part) so it should just ask whether to create the dir, okay?Or would it be cooler to add a general option: Configuration | Tabs and Panes | Dual Pane | Sync Browse auto-creates any missing folder ?
FAQ | XY News RSS | XY Twitter
-
- Posts: 6
- Joined: 09 Jun 2021 10:18
Re: Sync Browse - auto create subfolder
actually i wish filezilla had an option in preferences to turn that dialog off, so it would just create the folder without asking questions. some people might like the warning though.
-
- Site Admin
- Posts: 62188
- Joined: 22 May 2004 16:48
- Location: Win8.1 @100%, Win10 @100%
- Contact:
Re: Sync Browse - auto create subfolder
So let's do it like I attached it at the end of my post. My preference as well.
FAQ | XY News RSS | XY Twitter
Re: Sync Browse - auto create subfolder
I would prefer the question if the missing dir should be created.admin wrote: ↑10 Jun 2021 18:06 I like and use FileZilla myself, so it cannot be such a bad idea. I checked it and saw that there is a prompt before anything happens:
2021-06-10_180356.png
XYplorer does not need the second option (the disabling part) so it should just ask whether to create the dir, okay?
Or would it be cooler to add a general option: Configuration | Tabs and Panes | Dual Pane | Sync Browse auto-creates any missing folder ?
Its not a big risk to also have a general option.
Windows 11 Home, Version 24H2 (OS Build 26100.2033)
Portable XYplorer (Actual version, including betas)
Everything 1.5.0.1383a (x64), Everything Toolbar 1.5.1, Listary Pro 6.3.1.81
Portable XYplorer (Actual version, including betas)
Everything 1.5.0.1383a (x64), Everything Toolbar 1.5.1, Listary Pro 6.3.1.81
-
- Site Admin
- Posts: 62188
- Joined: 22 May 2004 16:48
- Location: Win8.1 @100%, Win10 @100%
- Contact:
Re: Sync Browse - auto create subfolder
That would make it more complex because there would be three ways (and one checkbox is not enough):
1) just go into that one folder (as it's done now, and I want to keep this option)
2) always create missing folder (new general option)
3) ask each time
1) just go into that one folder (as it's done now, and I want to keep this option)
2) always create missing folder (new general option)
3) ask each time
FAQ | XY News RSS | XY Twitter
-
- Posts: 6
- Joined: 09 Jun 2021 10:18
Re: Sync Browse - auto create subfolder
This would make it a general option "Sync Browse auto-create missing folders" (on/off), with the sub-option "ask before create" (yes/no). sounds good to me. and not too complex.
-
- Site Admin
- Posts: 62188
- Joined: 22 May 2004 16:48
- Location: Win8.1 @100%, Win10 @100%
- Contact:
Re: Sync Browse - auto create subfolder
Not too complex but maybe not too necessary. I assume after you've seen this prompt more than two times you have enough of it and turn it off anyway. And it would have to be a 3-way prompt (not too nice for the brain):moritz.glaesle wrote: ↑11 Jun 2021 06:05 This would make it a general option "Sync Browse auto-create missing folders" (on/off), with the sub-option "ask before create" (yes/no). sounds good to me. and not too complex.
Yes: create
No: don't create but go
Cancel: do nothing
ATM I'd rather keep it as simple as it is now. Sync Browse should be a smooth experience.
FAQ | XY News RSS | XY Twitter
Re: Sync Browse - auto create subfolder
i'd say prompt is not needed, but an indicator(smth like a line when filters are used) would be good, 'cause as i understand this sync-view mod works only when in 2 panel mode, so easily can be forgotten to be On if switched to 1 panel and much later again back to 2.
Win 7 SP1 x64 100% 1366x768|1900x1080
Re: Sync Browse - auto create subfolder
I guess most users which are using 2 panes doing that most of the time
and will never forget that they have switched on this feature.
Why should I ever want to switch it off ?
Windows 11 Home, Version 24H2 (OS Build 26100.2033)
Portable XYplorer (Actual version, including betas)
Everything 1.5.0.1383a (x64), Everything Toolbar 1.5.1, Listary Pro 6.3.1.81
Portable XYplorer (Actual version, including betas)
Everything 1.5.0.1383a (x64), Everything Toolbar 1.5.1, Listary Pro 6.3.1.81