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.
Sync only visible folders
Re: Sync only visible folders
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
So, it requires a script?
Re: Sync only visible folders
Yeah, seems so
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
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
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).
FAQ | XY News RSS | XY X
Re: Sync only visible folders
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;
$src, $dst and the sync command arguments^^One of my scripts helped you out? Please donate via Paypal
XYplorer Beta Club