Announcement

Collapse
No announcement yet.

Null extension

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

  • Null extension

    What filemask matches only filenames having a null extension?

    Thanks.

  • #2
    I would guess the mask without extension: *.

    Greetings Lutz

    Comment


    • #3
      Originally posted by Lutz View Post
      I would guess
      Ah, so I am not the only one who reads the documentation

      Originally posted by Lutz View Post
      the mask without extension: *.
      Thanks, but no:

      Comment


      • #4
        As it's not possible to create NULL-extension files on Windows, the zip is created on a Mac, isn't it? What happens extracting on a Windows System? Are the files refused or are they the right nullextension and spaceextension (I think Windows cuts the extension on creating the files, so filenames differ afterwards)?

        Comment


        • #5
          Originally posted by Lutz View Post
          the zip is created on a Mac, isn't it?
          Yup. Hence "Mac OSX".

          Originally posted by Lutz View Post
          What happens extracting on a Windows System?
          What you saw on the right.

          Originally posted by Lutz View Post
          Are the files refused
          BC unzips them without complaint.

          Originally posted by Lutz View Post
          or are they the right nullextension and spaceextension (I think Windows cuts the extension on creating the files, so filenames differ afterwards)?
          The four files in the left-side ZIP get unzipped to the four files on the right.

          Comment


          • #6
            Hello,

            Try ?.*
            Aaron P Scooter Software

            Comment


            • #7
              Originally posted by Aaron View Post
              Try ?.*
              Thanks, but that doesn't work here, inc. on 15875. Does it work there?

              Comment


              • #8
                Aaron mistyped it. It should be "?*."
                Zoë P Scooter Software

                Comment


                • #9
                  Originally posted by Craig View Post
                  "?*."
                  Thanks - that works on the ZIP. Not on the unzipped file, but perhaps that's down to Windows removing the null extension.

                  Chris (mystified as to why adding the apparently redundant ? has any effect)

                  Comment


                  • #10
                    Yeah, the extracted file's name won't include the trailing period because Windows doesn't support it.

                    Filters in the form "*.xyz" trigger an optimization in the filtering logic and "*." also triggers that behavior, but it won't match right (discovered while looking into this for you). Changing to ?*. bypasses that.

                    Unfortunately since * matches any character including "." the syntax doesn't have a good way to match only files without extensions. The only way to do it is "[^.];[^.][^.];[^.][^.][^.];etc", expanded out to the maximum number of characters any file name can contain.
                    Zoë P Scooter Software

                    Comment


                    • #11
                      Originally posted by Craig View Post
                      Filters in the form "*.xyz" trigger an optimization in the but it won't match right (discovered while looking into this for you).
                      Thanks.

                      Originally posted by Craig View Post
                      Changing to ?*. bypasses that.
                      Sounds like undefined behaviour, so I'll avoid storing that in a session.

                      Originally posted by Craig View Post
                      ... "[^.];[^.][^.];[^.][^.][^.];etc", expanded out to the maximum number of characters any file name can contain.
                      I might just end up doing that. Thanks for making the input control capacity so generous.

                      Comment

                      Working...
                      X