Announcement

Collapse
No announcement yet.

Mirror including deletion of filtered files

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • Mirror including deletion of filtered files

    Here's what I'd like to do:

    Mirror a source directory (A) to destination directory (B).
    But with file & directory filters applied such that files/dirs in B that match the filter are deleted.

    Something like this:

    (A) -> [Filter] -> (A') -> [Mirror] -> (B)

    A' is kind of a virtual directory structure and a sub-set of A.

    I can see how to achieve this by, for example, deleting all of B and then running a filtered mirror.
    But B is getting quite large and the filter quite extensive so this is time consuming and difficult to handle manually if I extend the filter (hence want to delete the target of the filter in B).

    Is this possible via the GUI?

    Thanks!

  • #2
    Hello,

    If you are performing this via the GUI, and have a filter that determines what should be deleted, you could load B in a Folder Compare session with the filter set. This would then only show items that should be deleted, so you could Select All, and Delete. Since only the items you want to delete are visible, a Select All would only select these visible items. Just be sure the delete dialog's option to "include Excluded items" is disabled. You can then run the A -> B sync as the second step.

    If you are trying to do the Sync in one step, it would require the filter to Include all the items you want to delete in B but also all the items you want to sync from A to B. This also assumes the items want to delete in B do not exist in A (which is how a Mirror determines they should be deleted).

    How does this work for you?
    Aaron P Scooter Software

    Comment


    • #3
      Mirror including deletion of filtered files

      Hi Aaron, thanks for your quick reply!

      I think I explained what I want to do quite poorly. :-)

      My filter is mainly to exclude files/dirs, rather than include them.

      Let's say that, at some point in time, FILE.TXT exists in A and B and isn't excluded in the filter.
      That works OK and any changes in FILE.TXT in A are mirrored to B.

      Now, at a later time, I add FILE.TXT to the exclusion filter (e.g. "-FILE.TXT").
      The file still exist in both A and B, but since I've now added an exclusion filter I'd also like to delete the file in B.
      But, BC doesn't delete it because it no longer within the filter scope. That's the bit I'm trying to work around.

      Does that make sense?

      Thanks!


      Originally posted by Aaron View Post
      Hello,

      If you are performing this via the GUI, and have a filter that determines what should be deleted, you could load B in a Folder Compare session with the filter set. This would then only show items that should be deleted, so you could Select All, and Delete. Since only the items you want to delete are visible, a Select All would only select these visible items. Just be sure the delete dialog's option to "include Excluded items" is disabled. You can then run the A -> B sync as the second step.

      If you are trying to do the Sync in one step, it would require the filter to Include all the items you want to delete in B but also all the items you want to sync from A to B. This also assumes the items want to delete in B do not exist in A (which is how a Mirror determines they should be deleted).

      How does this work for you?

      Comment


      • #4
        A bit.

        You still want to keep the file in A, correct?

        We do not have a method of deleting only out of B using filtering this way. You would likely need a saved Folder Compare session which manages the deletes by having a filter that proactively finds the items you want to delete. Excluded items are a means of removing and not acting on the item, which is the opposite of what you are looking for.
        Aaron P Scooter Software

        Comment


        • #5
          Yes, that's correct, I want to keep the file in A.

          Mirroring of virtual directories is a feature for BC 5 then, yeah? :-)

          Comment


          • #6
            Hello,

            We have Snapshots, but because it's a virtual directory, it does not reference the original files. We can't copy from a snapshot since it is just a virtual representation of the location, not the actual location.

            One strategy I might recommend: Set your filter to remove your items that you want to delete. Then Perform your Sync (which, won't delete the items). Then go to the Session menu -> Session Settings, Name Filters tab, and Cut/Paste from Exclude to Include. Does this properly invert your filter, only showing the files you now intend to delete? You can then set the Display Filter to narrow this down further if needed, and Select All, then Shift+Arrow key to only select one side, which only shows the Included (to be deleted) files, which you can then delete.
            Aaron P Scooter Software

            Comment


            • #7
              Thanks Aaron, that works a treat. :-)

              Comment

              Working...
              X