Announcement

Collapse
No announcement yet.

Scan 2 drives but only for specific folder names

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

  • Scan 2 drives but only for specific folder names

    Hi,

    Basically, I used BC to migrate a server to new hardware. I thought it worked perfectly, but I only now realise that some folders were excluded.
    Fortunately, I still have to old server. I want to scan the old and new servers, but only show folders that are named something specifically.
    Now, the problem came about only because I'd excluded those folders, so I've reversed that and Included those folders now. But it doesn't work?

    Under the Session > Name Filters, I've added the folder name into INCLUDE FOLDERS: section, but only includes the folder in the root of the drive, not any folders within subfolders further down the tree. Yet when this was scripted, it exluded folders several layers deep.

    How do I do this using the interface, as I need to verify the folders that are effected before I copy them back?

    Thanks in advance, Alan

  • #2
    Hello Alan,

    For the Include to include items, all items on higher levels also need to be included.
    So an exclude filter of -folder\ would need to be rewritten as
    .\...\folder\

    This filter starts at the base folder and includes all items up to any level where "folder\" eventually appears.

    Might it be easier to simply not use the filter? If the items are on both sides, you can re-run the entire comparison. Any items that were not copied would be Orphans; any files that were copied would likely be newer or equal on the destination/new side. Using Display Filters you should be able to narrow the view and review the files that are still Orphans (Or Newer or Different) on the server.
    Aaron P Scooter Software

    Comment


    • #3
      Thanks for the reply, but I can't understand how or why it did this in the first place then? If the exlusion/inclusion only works at the level you specify, how did it ever fall out of sync?
      I can GUARANTEE that the exclusions I specified ('TCF' and 'ARCHIVE' by the way) are missing from the destination.

      The source had TCF and ARCHIVE folders in the root of the drive, but many of the folders several levels down, also had folders named ARCHIVE and TCF, and these are missing on the destination???

      How?

      I can't really do the compare without filters, as the data was synced over a month ago now, and some data has been moved, lots of it changed, and it's a huge volume too - over 1TB.

      Thanks, Alan

      Comment


      • #4
        Hello,

        This depends on the specific syntax used, but if you exclude a folder by name, with no path information given, it will exclude that folder at any level.

        If you set a filter to include a folder with no path information given, it will only include a folder at the base level. If a folder with the same name is located within a subfolder, the subfolder also needs to be included somehow (either by using the syntax to include the path, or with another filter that includes that folder).

        .\ signifies to start at the base level
        .\...\folder\ signifies to start at the base level but also include any number of subfolders while looking for "folder\"

        To Exclude at a specific level, you would need to set the path:
        .\folder\
        or
        .\*\folder\ (for level 2)
        Aaron P Scooter Software

        Comment


        • #5
          I am not sure I've understood you correctly... Surely if my job excluded all folders named TCF and ARCHIVE from all folders and sub-folders, including the root, then changing the include to match the exclude, and vice versa, and re-running the job should work? But it doesn't...

          My Folder compare job "vol2compare" was comparing DRIVEA with DRIVEB, I was then using the command line to sync the data - BCompare.exe /silent @vol2.txt. The compare session, had exclude folders archive and TCF, include was set to *. Other parameters under handling, first 3 options ticked, compare file size and timestamp, ignoring DST and 2 second tolerance.

          Contents of VOL2.TXT...

          log verbose "C:\server copies\VOL2-BC-%date%.txt"
          criteria timestamp size
          option confirm:yes-to-all
          load vol2compare
          sync create-empty mirror:lt->rt

          Comment


          • #6
            Include and Exclude statements are not necessarily identical because you can have both at the same time in the same filter string. You can Include only specific folders, then exclude items within them, for example.

            I always strongly encourage any testing to be done in the graphical interface first. This way you can quickly toggle between different filter sets and see how your data is displayed. You can also quickly Suppress Filters to preview which data is hidden. This way, you can know how the filter is impacting your current comparison.

            Script actions offer no preview before running, and /silent would suppress any feedback entirely. While troubleshooting I would recommend starting in the graphical interface first. Once the filter is set there and is Including or Excluding the data you expect, you can copy/paste the filter string into the script and test it without silent. Once that is confident, you can add /silent back.
            Aaron P Scooter Software

            Comment

            Working...
            X