Filtering File Types BELOW Base Folder

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • Anklebuster
    Visitor
    • May 2005
    • 5

    Filtering File Types BELOW Base Folder

    Hi,
    Finally bought BC2, after using half of the very generous evaluation days. I was posting under Mitch-Evaluator and mentioned that filters didn't work. Now, I've discovered that BC2 only seems to filter file types within the base folder and one level deep only, and failing to exclude the same extensions in sub-sub-folders. So, if Base folder \Manager has a sub-folder named \Shortcuts and the folder \Shortcuts has a sub-folder named \Scripts, then any files with a .lnk extension will be ignored if they're in \Shortcuts, but included if they are in \Shortcuts\Scripts

    I used the interactive filter "builder". Here is the script:
    Code:
    # Hanoi Backup Script
    # Version 1.4 May 22, 2005
    
    Log normal
    
    load <default>
    option confirm:yes-to-all
    filter  "-*.mp3;-*.lnk;-*.exe;-.\zzzBackup\"
    # Base Folders (right side calculated by Backup Monitor)
    load "C:\Documents and Settings\Manager" "J:\Hanoi\ARCHIVE 2\1
    expand All
    select left.newer.all left.orphan.all
    copyto lt path:base "J:\Hanoi\ARCHIVE 2\1\Manager"
    Okay, I changed the select statement to read
    select left.newer.files left.orphan.files

    and it worked! Apparently, the .all overrides the filter?
    Since it processed sub-folders, why do we even need .folders?
  • Zoë
    Team Scooter
    • Oct 2007
    • 2666

    #2
    Re: Filtering File Types BELOW Base Folder

    Change your select statement to this instead: select left.newer.files left.orphan.files

    The file operations don't pay attention to filters right now, so if you tell BC to copy orphaned folders it will copy all of the files in it even if they're supposed to be filtered out.
    Zoë P Scooter Software

    Comment

    • Anklebuster
      Visitor
      • May 2005
      • 5

      #3
      Re: Filtering File Types BELOW Base Folder

      Thanks!

      Comment

      • Anklebuster
        Visitor
        • May 2005
        • 5

        #4
        Revisiting Filters

        Change your select statement to this instead: select left.newer.files left.orphan.files

        The file operations don't pay attention to filters right now, so if you tell BC to copy orphaned folders it will copy all of the files in it even if they're supposed to be filtered out.
        I originally thought you meant that eliminating the left.orphan.folders would solve the problem of copying files that were supposed to be filtered. However, does orphan override newer? I have been noticing that each backup copies files that haven't been changed. I understand NEWER to mean a date and time that is more recent than the corresponding file on the right side. However, the following script copies files willy-nilly. when I remove the left.orphan.files, the script does not copy anything.

        Code:
         # Hanoi Backup Script
        # Version 1.4 May 22, 2005
        
        Log normal
        
        load <default>
        option confirm:yes-to-all
        filter  "-*.mp3;-*.lnk;-*.exe;-.\zzzBackup\;-.\Cookies\;-.\Local Settings\"
        # Base Folders (right side calculated by Backup Monitor)
        load "C:\Documents and Settings\Manager" "J:\Hanoi\ARCHIVE 1\1
        expand All
        select left.newer.files left.orphan.files
        copyto lt path:base "J:\Hanoi\ARCHIVE 1\1\Manager"
        Anklebuster

        Comment

        • Chris
          Team Scooter
          • Oct 2007
          • 5538

          #5
          Re: Revisiting Filters

          It is possible the default criteria might not include timestamp comparison. In that case BC won't see any files as newer.

          Try running:
          Code:
          Log normal
          criteria timestamp
          option confirm:yes-to-all
          filter  "-*.mp3;-*.lnk;-*.exe;-.\zzzBackup\;-.\Cookies\;-.\Local Settings\"
          # Base Folders (right side calculated by Backup Monitor)
          load "C:\Documents and Settings\Manager" "J:\Hanoi\ARCHIVE 1\1"
          expand All
          select left.newer.files left.orphan.files
          copyto lt path:base "J:\Hanoi\ARCHIVE 1\1\Manager"
          Chris K Scooter Software

          Comment

          • Anklebuster
            Visitor
            • May 2005
            • 5

            #6
            Re: Revisiting Filters

            Thanks for the suggestion. It didn't work. The script either copies all files (except filtered ones) or it copies none, if I remove the left.orphan.files.
            For the time-being, I'll have to go with the full backup (ARRGH)
            I'm not really complaining, since this is not BC2's forte. I definitely like the FTP capability. The backup just seems like icing on the cake. Let me know if you figure out a solution to the orphan problem.
            Thanks!

            Comment

            • Chris
              Team Scooter
              • Oct 2007
              • 5538

              #7
              Re: Revisiting Filters

              I think the problem is that your base folders don't match.

              Your load statement is:
              load "C:\Documents and Settings\Manager" "J:\Hanoi\ARCHIVE 1\1"

              but you're copying to:
              copyto lt path:base "J:\Hanoi\ARCHIVE 1\1\Manager"

              If you change your load statement to:
              load "C:\Documents and Settings\Manager" "J:\Hanoi\ARCHIVE 1\1\Manager"

              You should get the behavior you're looking for. Your previous script was seeing everything as an orphan because the level of the base folders was off by one.
              Chris K Scooter Software

              Comment

              • Anklebuster
                Visitor
                • May 2005
                • 5

                #8
                Re: Revisiting Filters

                Chris,
                That was it! Thanks a bunch.

                Comment

                Working...