Announcement

Collapse
No announcement yet.

Exclude a Parent Directory, but Include a Child?

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

  • Exclude a Parent Directory, but Include a Child?

    I apologize if this sort of thing has been asked; I did search, but it's not an easy query to search on.

    What I want to do is simple, but I can't seem to make it work: I have a large 3D game installed to a certain directory on my hard drive, but I only want to sync the subdirectory thereof that contains the ever-changing "savegames" files.

    Specifically, here are the directories:

    Parent install directory:
    D:\Games\Quake 4\

    Savegames directory:
    D:\Games\Quake 4\q4base\savegames\

    Is there a way to exclude all directories under D:\Games\Quake 4\ (and exclude that directory itself), yet still sync D:\Games\Quake 4\q4base\savegames\?

  • #2
    Re: Exclude a Parent Directory, but Include a Chil

    Open the "File Filters" dialog from the Session menu. Remove the '*' from the "Include Folders" area and replace it with a filter that only matches D:\Games\Quake 4\q4base\savegames. Assuming your base folder is D:, that would mean adding this line:

    .\Games\Quake 4\q4base\savegames
    ZoŽ P Scooter Software

    Comment


    • #3
      Re: Exclude a Parent Directory, but Include a Chil

      Thank you. I neglected to mention that this same session is already used to sync the entire D:\ directory. This is where the confusion comes in, and I apologize for failing to explain it well.

      So basically, I would like to sync everything under D:\, and exclude D:\Games\Quake 4\, with the exception of D:\Games\Quake 4\q4base\savegames\.

      I'm thinking the only way to do this without manually excluding every single undesired directory is to use an entirely separate session.

      Comment


      • #4
        Re: Exclude a Parent Directory, but Include a Chil

        It might work to filter out the contents of each subfolder in the Quake 4 subdirectory.

        Here's an example:

        -.\Games\Quake4\*.*;-.\Games\Quake4\q4base\*.*

        If you use .\dir\*.*, it will only filter out the files in that directory. Using the filter .\dir\ affects that directory and all subdirectories.
        Chris K Scooter Software

        Comment


        • #5
          Good evening!

          I would like to join in this discussion because I have a similar request. Since the last post is from 2007 (now it's 2019) and I use BC 4.2.9, I thought there might be an easier way to do so?

          What I basically do is I synchronize my documents folder on my computer with my USB stick. Now, in the filter view there are four windows: "include data", "exclude data", "include folders", "exclude folders".
          In "include data" I have *.*
          In "include folders" I have *

          Now, there is one big folder with dozens of subfolders on my hard drive which I would like to exclude from synchronization. So i put it into "exclude folders".
          Example:

          .\photos

          But within the folder "photos" there is one specific subfolder which I would like to include in my everyday sync routine. I thought, I could just add it to "include folders", like this:

          .\photos\family

          Now, it seems (and that is quite sensible) that the "exclude folders" overrides the "include folders" because BC does not synchronize the chosen subfolder. I know that what I could do instead of excluding ".\photos" is exclude all subfolders one after another except ".\photos\family". But that seems quite cumbersome, especially when the contents of the main folder regularly change.

          Couldn't I just tell BC to exclude everything in a folder and just make an exception for one specific subfolder?

          Thank you very much in advance for your help! I appreciate!
          Last edited by Yukusoona; 17-Mar-2019, 03:10 PM.

          Comment


          • #6
            Hello,

            Thanks for the feedback. We do not have a two-stage or conditional name filter support, but it is something on our wishlist. In the meantime, you would need to define two different sets of filtering: one to include only the sub item, and one to include the parent subfolder that requires excluding; you can then perform the sync in two passes.

            Alternatively, you could set up a series of Include Filters to cover all other parent items, and the specific subfolder, but this assumes that the included definitions wouldn't shift.
            .\ParentExcluded\subfolder\...\*.*
            .\ParentAlwaysIncluded\...\*.*
            .\ParentAlwaysIncluded2\...\*.*
            .\*.*
            (these are file name filters to include all files within specific folders).
            Aaron P Scooter Software

            Comment

            Working...
            X