Sync folders ignore Recycle bin

Features wanted...
Post Reply
I.R.Brainiac
Posts: 30
Joined: 08 Nov 2022 22:56

Sync folders ignore Recycle bin

Post by I.R.Brainiac »

Sync folders is terrific...except it also grabs hidden folders like the recycle bin.
I only spotted this because it was transferring 30 GBs of recycled files.

Maybe an option to ignore hidden files and folders?

thanks from Michael. :cup:

Silver lining...it showed me 30 gigs of recycled files that got orphaned by an OS crash and re-install. :shock:

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

Re: Sync folders ignore Recycle bin

Post by admin »

Hmm, good point. I just wonder where to put this option in the UI... :maf: ... or make it a tweak, factory default "Sync folders ignores Recycle bin"? Opinions?

klownboy
Posts: 4089
Joined: 28 Feb 2012 19:27

Re: Sync folders ignore Recycle bin

Post by klownboy »

I don't think I'd ever want to sync "Recycle Bin" or "System Volume Information". Maybe someone else would. Though I can't see why - maybe for a full partition or disk image when using an imaging program. Back about a year ago I had failed at trying to eliminate the sync of Recycle Bin by using the "-" switch.
Windows 11, 22H2 Build 22621.1555 at 100% 2560x1440

I.R.Brainiac
Posts: 30
Joined: 08 Nov 2022 22:56

Re: Sync folders ignore Recycle bin

Post by I.R.Brainiac »

My preference would be ignore hidden files and folders as default.
I'm sure there are cases where you would want them synced but nothing comes to mind.
Sync is a function I am relatively new to so I have only used it to sync personal files and music.I process all of my music so losing them isnt as easy as just redownloading.

Anything OS related is backed up with Rescuezilla or Macrium.

Long winded way of saying...I only want to sync visible files and folders by default and if I need hidden stuff i will make them visible and select them as well.

Maybe just make that default behavior.If its visible,its synced. :cup:

jupe
Posts: 2749
Joined: 20 Oct 2017 21:14
Location: Win10 22H2 120dpi

Re: Sync folders ignore Recycle bin

Post by jupe »

Since you asked for opinions, I don't think auto excluding hidden files as has been suggested is a good idea because then important files like desktop.ini would be excluded. Since we are talking about GUI, maybe it would be an idea just to add a input field to the sync dialog that supports the same filter argument as the SC, then the default entries could be something like "-?:\$Recycle.Bin\|-?:\System Volume Info\".

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

Re: Sync folders ignore Recycle bin

Post by admin »

klownboy wrote: 02 Dec 2022 11:59 Back about a year ago I had failed at trying to eliminate the sync of Recycle Bin by using the "-" switch.
This did not work? -?:\$Recycle.Bin\

klownboy
Posts: 4089
Joined: 28 Feb 2012 19:27

Re: Sync folders ignore Recycle bin

Post by klownboy »

admin wrote: 04 Dec 2022 08:30 This did not work? -?:\$Recycle.Bin\
In hindsight, I may be confusing attempts to exclude those folders using "/excl=" with quicksearch. It's been too long to remember what I had tried. I use "-" with other folders successfully. I'll check it out later today.
Windows 11, 22H2 Build 22621.1555 at 100% 2560x1440

klownboy
Posts: 4089
Joined: 28 Feb 2012 19:27

Re: Sync folders ignore Recycle bin

Post by klownboy »

I ran a couple of tests and had no issues using sync with "-?:\$Recycle.Bin\|-?:\System Volume Info\". I only use sync in a scripting, not the GUI so I'm all set.. My issue a long while back was with SC quicksearch looking for certain folders and eliminating those subject folders from the results.
Windows 11, 22H2 Build 22621.1555 at 100% 2560x1440

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

Re: Sync folders ignore Recycle bin

Post by admin »

Good, thanks for testing. :cup:

klownboy
Posts: 4089
Joined: 28 Feb 2012 19:27

Re: Sync folders ignore Recycle bin

Post by klownboy »

I was too quick to say all is well with those sync exclusions. With Syntax checking ON for the first line in script below, I receive Dubious Syntax errors with "-?:\$Recycle.Bin\", one for $Recycle. I assume for the "$" and another for ".Bin" The exclusion does work and no problems with syntax checking off. I can also exclude "System Volume Information" folder by itself as in the second line below. I believe the syntax is correct, but for some reason I cannot get the exclusions to work for both "-?:\$Recycle.Bin\|-?:\System Volume Info\" when combined as in the third line.

Code: Select all

  $sync = <<<>>>
E:\<-->  I:\Temp|"E:\", "I:\Temp", 1, 0, 1, "cp",,"-?:\$Recycle.Bin\"|:sync   //works
E:\<-->  I:\Temp|"E:\", "I:\Temp", 1, 0, 1, "cp",,"-?:\System Volume Information\"|:sync   //works
E:\<-->  I:\Temp|"E:\", "I:\Temp", 1, 0, 1, "cp",,"-?:\$RECYCLE.BIN\|-?:\System Volume Information\"|:sync    // does not work
E:\<-->  I:\Temp|"E:\", "I:\Temp", 1, 0, 1, "cp",,"-?:\$RECYCLE.BIN\|?:\System Volume Information\"|:sync     // does not work
>>>;
   $sel = inputselect("     SOURCE         <-->          TARGET", $sync, <crlf>,1+4+32+1024+8192, , 300, 500, "<space 7>SYNC OPERATIONS");
   if($sel) {load "sync $sel", , "s";}
Windows 11, 22H2 Build 22621.1555 at 100% 2560x1440

jupe
Posts: 2749
Joined: 20 Oct 2017 21:14
Location: Win10 22H2 120dpi

Re: Sync folders ignore Recycle bin

Post by jupe »

It is to do with the inputselect listdata separator being |, so you'd need to script it differently, for example call them with a load instead, or like this:

Code: Select all

E:\<-->  I:\Temp|"E:\", "I:\Temp", 1, 0, 1, "cp",,"-?:\$RECYCLE.BIN\" . chr(124) . "-?:\System Volume Information\"|:sync

klownboy
Posts: 4089
Joined: 28 Feb 2012 19:27

Re: Sync folders ignore Recycle bin

Post by klownboy »

Don, regardless of the above, your beta v23.80.0103 does work in excluding both "$Recycle.Bin" as well as "System Volume Information" with syntax checking on. By the way on my system, "System Volume Info" is "System Volume Information", so I used SyncFilterGlobal=-?:\$Recycle.Bin\|-?:\System Volume Info*\ in XYplorer.ini.

Edit: To be clear, I do not receive the syntax errors mentioned above (with syntax checking on) when using sync "E:\", "I:\Temp", 1, 0, 1, "cp",,"-?:\$RECYCLE.BIN\|-?:\System Volume Information\"; so SC inputselect and "|" was causing that issue as well.

jupe thanks for the SC inputselect correction needed and the explanation. I should have tried it directly without inputselect.
Windows 11, 22H2 Build 22621.1555 at 100% 2560x1440

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

Re: Sync folders ignore Recycle bin

Post by admin »

Sure, "Information", not "Info"... :whistle: I'll fix the change log.

I.R.Brainiac
Posts: 30
Joined: 08 Nov 2022 22:56

Re: Sync folders ignore Recycle bin

Post by I.R.Brainiac »

I understood none of that so...I will just unhide everything before syncing and deselect unwanted items.

cheers :beer:

Post Reply