Does searchPattern in GetDirectories not recognize case differences?

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • sherifffruitfly

    #1

    Does searchPattern in GetDirectories not recognize case differences?

    I want to return all directories fitting the pattern "v*", but NOT
    include anything that starts with a capital "V". How can I do this?

    tia!
  • =?ISO-8859-1?Q?Arne_Vajh=F8j?=

    #2
    Re: Does searchPattern in GetDirectories not recognize case differences?

    sherifffruitfly wrote:
    I want to return all directories fitting the pattern "v*", but NOT
    include anything that starts with a capital "V". How can I do this?
    With Windows & NTFS then v.txt and V.txt is the same file, so would
    it make sense to consider them different ?

    Arne

    Comment

    • =?ISO-8859-1?Q?Arne_Vajh=F8j?=

      #3
      Re: Does searchPattern in GetDirectories not recognize case differences?

      Arne Vajhøj wrote:
      sherifffruitfly wrote:
      >I want to return all directories fitting the pattern "v*", but NOT
      >include anything that starts with a capital "V". How can I do this?
      >
      With Windows & NTFS then v.txt and V.txt is the same file, so would
      it make sense to consider them different ?
      If you really want it I guess you can get all files and make
      your own case sensitive comparison.

      Arne

      Comment

      • Peter Duniho

        #4
        Re: Does searchPattern in GetDirectories not recognize case differences?

        On Thu, 13 Dec 2007 15:06:31 -0800, sherifffruitfly
        <sherifffruitfl y@gmail.comwrot e:
        I want to return all directories fitting the pattern "v*", but NOT
        include anything that starts with a capital "V". How can I do this?
        You'd have to do it explicitly, and frankly doing so wouldn't make much
        sense, since the file system itself is case-insensitive. It stores case,
        but you can't have two different files or directories that have names
        differing only by case.

        Pete

        Comment

        • sherifffruitfly

          #5
          Re: Does searchPattern in GetDirectories not recognize casedifferences ?

          On Dec 13, 3:26 pm, "Peter Duniho" <NpOeStPe...@nn owslpianmk.com>
          wrote:
          On Thu, 13 Dec 2007 15:06:31 -0800, sherifffruitfly
          >
          <sherifffruit.. .@gmail.comwrot e:
          I want to return all directories fitting the pattern "v*", but NOT
          include anything that starts with a capital "V". How can I do this?
          >
          You'd have to do it explicitly, and frankly doing so wouldn't make much
          sense, since the file system itself is case-insensitive. It stores case,
          but you can't have two different files or directories that have names
          differing only by case.
          >
          Pete
          Ah - I hadn't realized - they're displayed "cased" in Windows
          Explorer.

          Ok then - does searchPattern permit regex matching?


          Thanks for pointing out the case insensitivity of directories/files
          all!

          Comment

          • Peter Duniho

            #6
            Re: Does searchPattern in GetDirectories not recognize case differences?

            On Thu, 13 Dec 2007 16:24:46 -0800, sherifffruitfly
            <sherifffruitfl y@gmail.comwrot e:
            [...]
            Ok then - does searchPattern permit regex matching?
            I'm reasonably sure it doesn't. It just supports, as far as I know, the
            same pattern-matching available via the Windows shell.

            Frankly, the search pattern parameter is really just a convenience
            parameter. It would be trivial for you to write a custom method that
            takes the full directory results and runs whatever search you want on it,
            including some sort of Regex-based matching if that's what you want.

            Pete

            Comment

            Working...