One-button sync

Can someone please tell me why this first button opens a new lister and runs the sync, but the second button doesn't run the sync when the new lister opens. The first has hardcoded paths in it and the second picks up the paths from what is open at the time. Thank you.

This behaves as expected

set dual=on
set source=left

go new 
[
Find SYNC FROM "c:\temp" TO "D:\temp" RECURSE COMPARE=newer HIDEUNAFFECTED
Copy SYNC
Set CLEARSYNC
]

This doesn't

set dual=on
set source=left
set dest=right

Go NEW=syncpanel {sourcepath} DUALPATH {destpath} 
[
set source=left
set dest=right
Find SYNC FROM {sourcepath} TO {destpath} RECURSE COMPARE=newer HIDEUNAFFECTED
Copy SYNC
Set CLEARSYNC
]

Sorry to disappoint: works fine here :slight_smile:

So the second button runs the sync automatically and doesn't require you to click the 'Compare' button, Alexander?

Yes. I tried my best to make it not work but it never failed.

Thank you. That is useful in itself. I’m curious now so will be digging a bit deeper.

Are you running a beta version of DOpus, Alexander? I am on the last GA version.

Yes. Always the latest.

Thank you. I don't normally do betas, but I wonder if that's the difference.

Opus 13.6 works fine here, too.

Is the aim to start a sync going without interacting with the sync UI? There's probably no need to open a new lister for that if so.

That is the aim. I did rather want it to happen in a new lister though. I still haven't fathomed out why it doesn't work for me, but seems to for Alexander.

So how would you do this without opening a new lister, Leo? It seems that when the new lister opens {destpath} is getting lost. Perhaps that's the problem, though I still cannot explain why it seems to work for Alexander.

Edit: This appears to work

set source=left
set dest=right
@set glob:s={sourcepath}
@set glob:t={destpath}
Go NEW
[
Find SYNC FROM "{$glob:s}" TO "{$glob:t}" RECURSE COMPARE=newer HIDEUNAFFECTED
Copy SYNC
Set CLEARSYNC
]