Filters & Orphaned Files

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • armsys
    Enthusiast
    • Jan 2004
    • 40

    Filters & Orphaned Files

    With all due respect, I just don't see the logic why orphaned files don't respect the Filter conditions.

    Armstrong
    Hong Kong
  • Chris
    Team Scooter
    • Oct 2007
    • 5538

    #2
    Re: Filters & Orphaned Files

    Hello Armstrong,

    Please post the script that you are having problems with so I can understand your problem.
    Chris K Scooter Software

    Comment

    • armsys
      Enthusiast
      • Jan 2004
      • 40

      #3
      Re: Filters & Orphaned Files

      Hello Chris,

      Thanks for your reply.

      # Process ArmSys
      load "c:\ArmSys" "U:\ArmSys"
      filter cutoff:<7days
      filter "-...\Outlook\*.*;-...\WhereIsIt\*.*;-...\Neo\*.*;-*.tmp;-~*.*;-*.~*;-*.bak;-*.ctf;-nw*.dat;-ASOL*.pst"
      expand ALL
      select lt.newer.files lt.orphan.files
      copy left->right
      select rt.newer.files rt.orphan.files
      copy right->left

      Some excluded files such as ASOL*.pst are copied from one side to another. The excluded folders often failed to be excluded.

      The version of Beyond Compare is 2.4 beta (build 238).

      Thanks.

      Armstrong
      Hong Kong

      Comment

      • Chris
        Team Scooter
        • Oct 2007
        • 5538

        #4
        Re: Filters & Orphaned Files

        Hello Armstrong,

        This modified version should work better:
        Code:
        # Process ArmSys
        criteria timestamp
        load "c:\ArmSys" "U:\ArmSys"
        filter "-...\Outlook\;-...\WhereIsIt\;-...\Neo\;-*.tmp;-~*.*;-*.~*;-*.bak;-*.ctf;-nw*.dat;-ASOL*.pst" cutoff:<7days
        sync create-empty update:all
        A filter statement will clear all previous filters, so the cutoff and filename filters need to be in the same filter command.

        A bidirectional sync does the same thing as your script from the expand all command to the end, it just does it in less commands.

        I also added a criteria statement at the beginning. This might not be necessary, but it is safer to add it in case your default comparison criteria don't include timestamp comparison.

        Also, I changed the folder filters from -...\Outlook\*.* to -...\Outlook\ to filter out the folder and all subfolders. Using the *.* form only matches files in the root of the Outlook folder. Subfolders and files in those folders will still be included.

        Please let me know if the modified script still doesn't do what you want.
        Chris K Scooter Software

        Comment

        • armsys
          Enthusiast
          • Jan 2004
          • 40

          #5
          Re: Filters & Orphaned Files

          Hello Chris,
          Thanks for your quick reply. Previously I didn't know that all filters should be grouped in a single line. BTW, is there any restriction imposed on the length the line?

          Now the big trouble is BC2 will hang if sync is aborted.

          Armstrong
          Hong Kong

          Comment

          • Chris
            Team Scooter
            • Oct 2007
            • 5538

            #6
            Re: Filters & Orphaned Files

            It is possible to hit a limit with an extremely long filter, but I think your filter has to be over several thousand characters long before you will run into it.

            For readability, you can also split filter statements into multiple lines using the & continuation character.

            Example:

            filter "foo.*; &
            bar.*; &
            *.txt"

            Thank you for the report of the hang. This is a known issue with large syncs. If you cancel while BC is building the list of files to sync, the script will hang. If you wait to cancel until files are being copied, BC won't hang. This is on our bug list and we'll work to fix it in a future version.
            Chris K Scooter Software

            Comment

            Working...