Find Sync example doesn't actually compare or sync

This is on my list to look at as I believe it should be possible in 13.

That would be great! Thanks for letting me know!

So the example given in the manual does seem to work ok here in a quick test.

Perhaps there really is no work to be done given the criteria you are specifying?

If you show a screenshot of how you have the Sync panel configured and the exact function you're trying, we can try and see if something's different between the two.

Today I'm seeing different behavior, and I don't know why. I know I rebooted my computer after installing the Directory Opus 13 upgrade, but maybe something else subsequently updated in the reboot I did last night? I don't know. Let me now amend my support request a tiny bit.

What I now see is that it seems like the default script does indeed work with one odd unwelcome artifact. It does indeed open the correct paths in my lister, and it does in fact do the sync now. But it enables grouping by type in one or both listers in a seemingly non-deterministic fashion. Sometimes it's the left pane that's grouped by type, sometimes the right, sometimes both. That's weird as I haven't specified any kind of folder customization for the paths in question.

I can't offer any explanation for why it's working differently today, but perhaps there's a niggling little group-by bug in there somewhere?

I don't think there's any reason for sync to turn on grouping itself, but maybe it's a by-product of a folder format. Try hovering over the (i) icon in the status bar for the tab with grouping turned on and see what it says about where the format came from.

It says "Edited by user (auto-remembered)", but I am fairly confident I have never grouped that folder by type.

If you remove its entry from Preferences / Folders / Folder Formats / Automatic Formats it should stop happening.

I'm not even sure I realized automatic formats were a thing, but that fixed my issue. Now I'm going to have to go digging into that feature to figure out how to use it properly. Thanks!

Try adding RECURSE to the first line:

Find SYNC FROM "D:\Work" TO "D:\Backups" RECURSE COMPARE=newer HIDEUNAFFECTED
Copy SYNC
Set CLEARSYNC

That was missing from the example but would usually be wanted with sync, so I'll add that to the docs. It's probably why it wasn't seeming to do anything as well (depending on the folder structures being synced).

Testing with that added, it works how I expect now.

Aha! That did it! That's going in my notes. Thanks! I'm so happy to have an automated sync feature that works from a simple button press. Now it's time to start making it work from a command line... :slight_smile:

Working here also. If you get a cmdline sync going, please post details here. Thanks.

This is so weird: this morning it's not working again. Clicking the button that yesterday was running a fully automated sync is today prompting me instead. I think I've now had different behavior every single day, which is bizarre.

Which prompt is it showing?

Sorry, I should have been more clear. It is correctly loading the A/B folders for the sync, though interestingly the A folder is showing on the right while the B folder is showing on the left, and then giving me the prompt for the work to be done to synchronize A -> B.

And I also find that it's grouping my panes randomly again by type and claiming it's auto-remembered when I have not done that at all since clearing all those auto-formats a day or two ago. Something is just a tad squirrely here.

While I'm at it, I should note that dragging the button to my desktop to create a *.dcf file and then double-clicking that file to run the command works only if I already have a lister open. Perhaps the "FIND" command needs a "NEW" option as "GO" has?

You can embed the command like this to open a lister:

Prefs LAYOUT=xyz
[
Find...
]

I'm sorry, but I don't understand. If I wrap the "FIND" command in that, I get the preferences dialog instead. Here's the contents of a "Sync Test.dcf" file created from a button I dragged from DO:

<?xml version="1.0"?>
<button backcol="none" display="both" textcol="none">
	<label>Sync Comics</label>
	<icon1>#newcommand</icon1>
	<function type="normal">
		<instruction>Find SYNC FROM D:\DOTest\A TO D:\DOTest\B RECURSE COMPARE=newer,size HIDEUNAFFECTED RUNINPANEL DELETE FIRST</instruction>
		<instruction>Copy SYNC</instruction>
		<instruction>Set CLEARSYNC</instruction>
	</function>
</button>

Could you perhaps show me what you mean with respect to embedding the command to make sure it opens a lister?

You need to replace xyz with one of your layouts. Alternatively, you could use Go NEW.

Go NEW
[
Find SYNC FROM D:\DOTest\A TO D:\DOTest\B RECURSE COMPARE=newer,size HIDEUNAFFECTED RUNINPANEL DELETE FIRST
Copy SYNC
Set CLEARSYNC
]
1 Like

That will be because the right side was source, I think.

You could add this before the Find line to make the source always on the left:

set dual=on
set source=left
// …Then Find, etc…

That "Go NEW" helped a lot, thanks!

Thanks, I've added it and will keep using it and see how it goes. So far, I've got multiple sync buttons and corresponding *.dcf files working from the desktop, but none of them run automatically today; they all prompt me. But hey, this is a metric ton closer to where I've wanted to be for years. Thanks, y'all!