Page 1 of 1

Sync only visible folders

Posted: 18 Sep 2025 16:57
by trainwreck
When syncing folders using the sync command (i.e., to a external HD for backup/archive purposes), I only want to sync folders that are visible. For instance, in the standard Win11 Documents folder, I've hidden several folders such as Custom Office Templates, Outlook Files, Remote Assistance Logs, etc. I don't see an option on the sync window to only copy visible folders so it ends up copying these over as well. Is this possible someway? I don't see a parameter in the sync command either for this.

Thanks.

Re: Sync only visible folders

Posted: 18 Sep 2025 17:14
by highend
it has a filter argument? read in the folder list, check the attributes, populate the list to exclude...

Re: Sync only visible folders

Posted: 18 Sep 2025 17:48
by trainwreck
So, it requires a script?

Re: Sync only visible folders

Posted: 18 Sep 2025 18:27
by highend
Yeah, seems so

Re: Sync only visible folders

Posted: 18 Sep 2025 18:36
by admin
Talking about Panes | Sync Folders...?

Re: Sync only visible folders

Posted: 18 Sep 2025 20:00
by trainwreck
Yes. I've been using it for awhile to back a large folder up to an external HD but always have to come back and delete the hidden folders afterwards.

Re: Sync only visible folders

Posted: 19 Sep 2025 10:02
by admin
Okay, that's an interesting idea. But it's nothing that can be done quickly. I put it on my list. It will happen (in the 64-bit version only).

Re: Sync only visible folders

Posted: 19 Sep 2025 11:08
by highend

Code: Select all

    $src    = "C:\Temp\tst\src";
    $dst    = "C:\Temp\tst\dst";
    $filter = regexmatches(quicksearch("/nd", $src, , "m"), "^.+?\|.+?H.*?$", <crlf>, 1);
    $filter = regexreplace($filter, "(\|.+?)$", "\");
    $filter = replace(regexreplace($filter, "^(.)", "-$1"), <crlf>, "|");

    sync $src, $dst, 1, 0, 1, "ckp", , $filter, 0;
Ofc you have to adapt your $src, $dst and the sync command arguments^^

Re: Sync only visible folders

Posted: 09 Oct 2025 12:38
by admin