Is it possible to prevent file being locked when it is opened by BC4 ?

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • ctc5301
    Journeyman
    • Mar 2016
    • 11

    Is it possible to prevent file being locked when it is opened by BC4 ?

    When a file is opened by BC it is locked. For my case I would prefer using other editor to modify the file and
    using BC for file comparison by automatic refresh. Is it possible to prevent file being locked when it is opened by BC? Sorry if my problem is a duplicate one because I could find a same one by searching the forum.
  • Aaron
    Team Scooter
    • Oct 2007
    • 16017

    #2
    Hello,

    BC4 itself does not normally lock a file by opening it in the Text Compare. What kind of file are you opening and if you close BC4 is it still locked?

    Also, are you running BC4.1.5? We had a fix for a potentially related locking issue in the last update.
    Aaron P Scooter Software

    Comment

    • ctc5301
      Journeyman
      • Mar 2016
      • 11

      #3
      Hex Compare

      Thanks for your reply.
      I use BC4 to open files under Hex Compare mode. The files opened are locked so my external editor could not modify them.
      So I have to exit BC4 to proceed my modification and then re-launch BC4 to check the comparison result. It would be very helpful for e if BC4 opens these file for read-only to let my external utility have write access right..
      The version is BC 4.1.5 (build 21031).

      Comment

      • Aaron
        Team Scooter
        • Oct 2007
        • 16017

        #4
        Hello,

        BC4's Hex Compare's Session Settings (Session menu -> Session Settings) has an option to load files without locking up to a specified size. The default is 2, but can be increased up to 32MB. Would your files be within this limit? It is something we have considered increasing but have not implemented yet.
        Aaron P Scooter Software

        Comment

        • ctc5301
          Journeyman
          • Mar 2016
          • 11

          #5
          Thanks!

          Originally posted by Aaron
          Hello,

          BC4's Hex Compare's Session Settings (Session menu -> Session Settings) has an option to load files without locking up to a specified size. ...
          Two thumbs up. Very helpful. Thanks.

          Comment

          • mptte
            Visitor
            • Mar 2019
            • 3

            #6
            Hi, I found this thread whilst trawling for partial file lock related content as I might be having a somewhat similar issue with partial locked .csv files. I'm struggling to find any settings relating to this.

            I'm running BC4 4.2.3 build 22587 via a Windows Scheduler task. Are there any settings available to handle partially locked files?

            Thanks

            Comment

            • Aaron
              Team Scooter
              • Oct 2007
              • 16017

              #7
              Hello,

              No additional settings; the lock option is specific to the Hex Compare. I would recommend testing with the graphical interface outside of scripting/automation, so you can see any feedback and interact mid-way for testing.

              If you update to BC 4.2.9 (all 4.x updates are free for 4.x users), and test loading a pair of sample files in the Table Compare, do you see the same locking issue?
              Last edited by Aaron; 12-Mar-2019, 04:11 PM.
              Aaron P Scooter Software

              Comment

              • mptte
                Visitor
                • Mar 2019
                • 3

                #8
                Edit: Should I use "sync mirror:left->right" instead of "sync update:left->right" in the script?

                Hi Aaron, thank you for the rapid reply.

                I've updated the software and used the graphical interface and for a folder compare it's picking up differences. I then save the session, load it via a script and it doesn't pick up the differences.

                The files are .csv and are being written to/updated periodically. BCompare updates the file initially then doesn't update it when it's contents change. The file will always grow, possibly only by a few kilobytes, how accurate is the size comparison method? Would you set this up in another manner?

                Thank you,

                Tom

                Click image for larger version  Name:	BCompareSettings.JPG Views:	2 Size:	59.0 KB ID:	80245
                Click image for larger version  Name:	BCompare.JPG Views:	1 Size:	68.7 KB ID:	80243
                Attached Files
                Last edited by mptte; 14-Mar-2019, 06:22 AM.

                Comment

                • Aaron
                  Team Scooter
                  • Oct 2007
                  • 16017

                  #9
                  Hello,

                  If you disable Timestamps, then Sync Update cannot sync (since it copies the Newer file). The content scan is additive when Override Quick Test Results is enabled, so you can compare Timestamp+Size+Binary, and this will show the file as Newer/Older if Binary different, and Same if Binary equal.

                  Sync Update will copy Newer/Orphan files.
                  Sync Mirror will copy any differences (Newer/Older/Different(red both sides), Orphans), but will also *delete* orphans in the destination side, in order to make the destination a "mirror" of the source.
                  Aaron P Scooter Software

                  Comment

                  • mptte
                    Visitor
                    • Mar 2019
                    • 3

                    #10
                    Thank you it was the Timestamp that was stopping it copy over properly.

                    Comment

                    Working...