Announcement

Collapse
No announcement yet.

Cosmetic: Do not display OSX hidden files

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

  • Cosmetic: Do not display OSX hidden files

    First off, great app. I love being able to use BC on a mac.

    Something I noticed is that the folder compare includes OSX hidden files, like .DS_Store and .localized. I think that these files shouldn't be included. I don't see an scenario when somebody would need to compare them. But I could be mistaken. Other option is to provide a preference to show or hide them.

    [I did a search on the forums for this topic, but I didn't find one. If somebody did, my apologies.]

  • #2
    I think that we need a toggle for them, not ignore them completely. Hidden files can also be config files, not junk resources like .DS_Store.

    Comment


    • #3
      Agree, some system files should be subject to comparison while others should not.

      I noticed some backup files produced from within XCode are placed in the same directory as original file but prefixed with "._" e.g. AppDelegate.m and ._AppDelegate as its alter ego.

      I would love to see some toggle that hides system files instead entering this pattern in Exclude Files list.

      Comment


      • #4
        Thanks for the feedback.
        Aaron P Scooter Software

        Comment


        • #5
          Correct me if I'm wrong, but we already have this feature under Session -> Session Settings... -> Name Filters. You can exclude any files or folders you wish. Then, you can show/hide with the Suppress Filters feature/button. I personally like being able to see ALL files. It's useful for cleanup when packaging/exporting/copying/comparing cross platform.

          I'd rather my comparison tool not decide for me what hidden/system files should or should not be subject to comparison.

          Comment


          • #6
            Yes, the files Unix traditionally considers hidden are those that start with ., and a filenames filter of -.* will exclude all of them already. On Windows we did introduce an option, "Ignore protected operating system files", which excludes any files or folders that have both the hidden and system attributes set. It's toggleable, and Suppress Filters does work with it, but it's also on by default to match Explorer's behavior. We could do something similar on Mac. I think there's one other way to make files hidden in Finder using one of the extended attributes, and we don't currently heave a way to exclude those, other than by name.
            ZoŽ P Scooter Software

            Comment


            • #7
              Syntax

              I am not a software expert.
              Could someone please inform the syntax in a filter for hidden files?
              Many thanks.

              Comment


              • #8
                Hello,

                In BC4, you can right-click a file (or multiple files) and select Exclude. This will auto-generate the syntax needed in the File Name Filters tab of the Session Settings. It is also displayed in the Filters toolbar.

                What would be your overall task? If you just need to exclude a few files, I would recommend using the right-click menu instead of typing File Name Filters.
                Aaron P Scooter Software

                Comment


                • #9
                  I've been trying to exclude files called Icon (not sure what they are all about) but BC seems insistent on showing them

                  Comment


                  • #10
                    I guess they just demand they be part of the group.

                    In all seriousness, however, could we get a full screen screenshot of the comparison showing these files? There are a few factors that might cause them to appear, such as if Suppress Filters is enabled, or if the syntax of the exclude filter isn't exact. Did you right click the Icon file and select Exclude, or did you type into the Filters toolbar, or the Session Settings' Name Filters, Exclude section?
                    Aaron P Scooter Software

                    Comment


                    • #11
                      The Icon files are actually titled "Icon\r" where \r is a carriage return (CR). CR is 0x0D hex, or 13 decimal. I too have tried in vain to get Beyond Compare to exclude these files in the filter. According to the "special characters" section of Beyond Compare's help, I tried \r, and I tried \x0D, as well as a few other ideas. It seems the filename filter is incapable of searching on and excluding files with a CR in the file name. This has become a huge annoyance because another user on the shared folder I'm syncing keeps placing Icon files in all the folders. So all folders appear as different and I have to manually check each folder to see if it is the Icon file or something important.

                      Scooter, if you are reading this, can you please look into fixing this - adding the ability to filter on \r or \x0D in the Name Filters dialog.

                      I also see the Filename Find function (Search -> Find Filename) does not properly search for \x0D or \r in a file name.

                      BTW, you have no argument from me that Apple shouldn't have named these files with a CR in the file name. But unfortunately, because they did, it is important that Beyond Compare be able to exclude them.

                      I am using Beyond Compare 4 build 18847 on Mac OS X 10.9. My Mac isn't creating these files, but someone else's Mac that shares the folder is. These files are only rarely created. .DS_Store is common on a Mac, but Icon files are not.

                      Regards,
                      Michael

                      Comment


                      • #12
                        Thanks for troubleshooting what was happening in this scenario. To exclude files like this, you need to use a masking character to capture it generally. This could potentially grab more files if they also have a single character or multiple characters.

                        ie:
                        Icon[^a-z0-9_.]
                        Icon?
                        Icon*
                        Aaron P Scooter Software

                        Comment


                        • #13
                          Originally posted by Lohmeyer View Post
                          The Icon files are actually titled "Icon\r" where \r is a carriage return (CR). CR is 0x0D hex, or 13 decimal.
                          [...]
                          BTW, you have no argument from me that Apple shouldn't have named these files with a CR in the file name. But unfortunately, because they did, it is important that Beyond Compare be able to exclude them.

                          I am using Beyond Compare 4 build 18847 on Mac OS X 10.9. My Mac isn't creating these files, but someone else's Mac that shares the folder is. These files are only rarely created. .DS_Store is common on a Mac, but Icon files are not.
                          For reference, those "Icon\r" files are created when a custom icon is applied to a folder. They exist a long way back into classic Mac OS days, but I just did a test and the same method is still used on OS X 10.10 Yosemite.

                          The Icon\r file is deleted if the custom icon is removed from the folder, which you can do in Finder via Get Info on the folder, clicking on the icon in the top left corner of the Get Info window, then pressing the delete key. This will restore the default folder icon. (You can also use the Edit > Cut command, or Command-X.)

                          Custom icons are added to the folder via the same route. After the custom icon has been drawn in whichever application you want to use, copy it to the clipboard, go into Finder's Get Info for the folder, click on the icon in the top left corner, and paste. Similarly, you can copy and paste icons between files/folders.

                          Comment


                          • #14
                            Originally posted by Aaron View Post
                            ...To exclude files like this, you need to use a masking character to capture it generally. This could potentially grab more files if they also have a single character or multiple characters.
                            Yes, I considered that. But you are right, "Icon?", "Icon*" or similar is too likely to catch legit files unfortunately.

                            Originally posted by dempson View Post
                            For reference, those "Icon\r" files are created when a custom icon is applied to a folder. They exist a long way back into classic Mac OS days, but I just did a test and the same method is still used on OS X 10.10 Yosemite.
                            I finally realized that it's Google Drive creating all these Icon files. Google Drive changes folder and file icons to represent if a folder is shared, syncing, etc. Dropbox does the same thing, but I've never seen Icon files in my Dropbox folder.

                            I sync parts of my Google Drive folder to a backup drive, but I don't want the Icon files (because they are Google Drive icons and should not be applied to folders & files outside of Google Drive). Hopefully Beyond Compare can be changed to allow filtering "Icon\r", but in the mean time, I'm just letting Beyond Compare sync the Icon files and and I'll just manually delete them later.

                            Regards,
                            Michael

                            Comment


                            • #15
                              The first example in the list is the least likely to catch other file names:
                              Icon[^a-z0-9_.]

                              You could also inverse and Include only these files to help with manual deletion if you have already brought some over. I'll also check with a developer if this is something we can try to handle. It may be tricky since the carriage return character is used as our delimiter in the File Name Filters section.
                              Aaron P Scooter Software

                              Comment

                              Working...
                              X