Sync only visible folders

Please check the FAQ (https://www.xyplorer.com/faq.php) before posting a question...
Post Reply
trainwreck
Posts: 4
Joined: 19 Feb 2020 16:29

Sync only visible folders

Post 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.

highend
Posts: 14571
Joined: 06 Feb 2011 00:33
Location: Win Server 2022 @100%

Re: Sync only visible folders

Post by highend »

it has a filter argument? read in the folder list, check the attributes, populate the list to exclude...
One of my scripts helped you out? Please donate via Paypal

trainwreck
Posts: 4
Joined: 19 Feb 2020 16:29

Re: Sync only visible folders

Post by trainwreck »

So, it requires a script?

highend
Posts: 14571
Joined: 06 Feb 2011 00:33
Location: Win Server 2022 @100%

Re: Sync only visible folders

Post by highend »

Yeah, seems so
One of my scripts helped you out? Please donate via Paypal

admin
Site Admin
Posts: 64916
Joined: 22 May 2004 16:48
Location: Win8.1, Win10, Win11, all @100%
Contact:

Re: Sync only visible folders

Post by admin »

Talking about Panes | Sync Folders...?

trainwreck
Posts: 4
Joined: 19 Feb 2020 16:29

Re: Sync only visible folders

Post 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.

admin
Site Admin
Posts: 64916
Joined: 22 May 2004 16:48
Location: Win8.1, Win10, Win11, all @100%
Contact:

Re: Sync only visible folders

Post 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).

highend
Posts: 14571
Joined: 06 Feb 2011 00:33
Location: Win Server 2022 @100%

Re: Sync only visible folders

Post 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^^
One of my scripts helped you out? Please donate via Paypal

admin
Site Admin
Posts: 64916
Joined: 22 May 2004 16:48
Location: Win8.1, Win10, Win11, all @100%
Contact:

Re: Sync only visible folders

Post by admin »


Post Reply