PC Review


Reply
Thread Tools Rate Thread

DirectoryInfo.GetFiles with 3-character extensions

 
 
Ray Mitchell
Guest
Posts: n/a
 
      9th May 2009
Hello,

I'm obviously missing the point, but the documentation on the GetFiles
method states that when a 3-character extension is supplied in the search
pattern it will match 3 or more characters. I've found this to be very
annoying and have often had to simply get a list of all files then manually
sift through them to locate those having exactly the 3-character extension
I'm looking for. Is there a way to turn off this "feature" in GetFiles so
that a 3-character extension means exactly a 3-character extension? Or maybe
I should be approaching this differently?

Thanks,
Ray
 
Reply With Quote
 
 
 
 
Cor Ligthert[MVP]
Guest
Posts: n/a
 
      9th May 2009
Ray,

And what about by instance .RA (real audio)

Cor

"Ray Mitchell" <RayMitchell_NOSPAM_@MeanOldTeacher.com> wrote in message
news:7AE0FF80-A736-4530-8065-(E-Mail Removed)...
> Hello,
>
> I'm obviously missing the point, but the documentation on the GetFiles
> method states that when a 3-character extension is supplied in the search
> pattern it will match 3 or more characters. I've found this to be very
> annoying and have often had to simply get a list of all files then
> manually
> sift through them to locate those having exactly the 3-character extension
> I'm looking for. Is there a way to turn off this "feature" in GetFiles so
> that a 3-character extension means exactly a 3-character extension? Or
> maybe
> I should be approaching this differently?
>
> Thanks,
> Ray


 
Reply With Quote
 
Cor Ligthert[MVP]
Guest
Posts: n/a
 
      9th May 2009
Ray,

And what about by instance .RA (real audio)

Cor

"Ray Mitchell" <RayMitchell_NOSPAM_@MeanOldTeacher.com> wrote in message
news:7AE0FF80-A736-4530-8065-(E-Mail Removed)...
> Hello,
>
> I'm obviously missing the point, but the documentation on the GetFiles
> method states that when a 3-character extension is supplied in the search
> pattern it will match 3 or more characters. I've found this to be very
> annoying and have often had to simply get a list of all files then
> manually
> sift through them to locate those having exactly the 3-character extension
> I'm looking for. Is there a way to turn off this "feature" in GetFiles so
> that a 3-character extension means exactly a 3-character extension? Or
> maybe
> I should be approaching this differently?
>
> Thanks,
> Ray


 
Reply With Quote
 
Ray Mitchell
Guest
Posts: n/a
 
      9th May 2009
> "Ray Mitchell" <RayMitchell_NOSPAM_@MeanOldTeacher.com> wrote in message
> news:7AE0FF80-A736-4530-8065-(E-Mail Removed)...
> > Hello,
> >
> > I'm obviously missing the point, but the documentation on the GetFiles
> > method states that when a 3-character extension is supplied in the search
> > pattern it will match 3 or more characters. I've found this to be very
> > annoying and have often had to simply get a list of all files then
> > manually
> > sift through them to locate those having exactly the 3-character extension
> > I'm looking for. Is there a way to turn off this "feature" in GetFiles so
> > that a 3-character extension means exactly a 3-character extension? Or
> > maybe
> > I should be approaching this differently?
> >
> > Thanks,
> > Ray

>
>

"Cor Ligthert[MVP]" wrote:

> Ray,
>
> And what about by instance .RA (real audio)
>
> Cor
>


Cor,

I'm not sure what you're telling me.

Ray

 
Reply With Quote
 
Ray Mitchell
Guest
Posts: n/a
 
      9th May 2009
> "Ray Mitchell" <RayMitchell_NOSPAM_@MeanOldTeacher.com> wrote in message
> news:7AE0FF80-A736-4530-8065-(E-Mail Removed)...
> > Hello,
> >
> > I'm obviously missing the point, but the documentation on the GetFiles
> > method states that when a 3-character extension is supplied in the search
> > pattern it will match 3 or more characters. I've found this to be very
> > annoying and have often had to simply get a list of all files then
> > manually
> > sift through them to locate those having exactly the 3-character extension
> > I'm looking for. Is there a way to turn off this "feature" in GetFiles so
> > that a 3-character extension means exactly a 3-character extension? Or
> > maybe
> > I should be approaching this differently?
> >
> > Thanks,
> > Ray

>
>

"Cor Ligthert[MVP]" wrote:

> Ray,
>
> And what about by instance .RA (real audio)
>
> Cor
>


Cor,

I'm not sure what you're telling me.

Ray

 
Reply With Quote
 
Cor Ligthert[MVP]
Guest
Posts: n/a
 
      9th May 2009
Peter,

I too spent some time on this, and I asked myself what is the reason for
this question.

Is it because that he wants to get all doc and docx files and that.

Then I remembered me all that went wrong with real audio files in past.
There were some with the name Rar as I remember it me well.

Therefore I replied in a question.

Maybe not the best thing, but I am born in area where that is often done to
give in fact an answer.

:-)

Cor

"Peter Duniho" <(E-Mail Removed)> wrote in message
news(E-Mail Removed)...
> On Sat, 09 May 2009 00:58:01 -0700, Ray Mitchell
> <RayMitchell_NOSPAM_@meanoldteacher.com> wrote:
>
>> [...]
>>> And what about by instance .RA (real audio)

>>
>> Cor,
>>
>> I'm not sure what you're telling me.

>
> I think he's asking if you have the same problem with (for example)
> two-character extensions. I'm assuming the answer to that would be "no".


 
Reply With Quote
 
Cor Ligthert[MVP]
Guest
Posts: n/a
 
      9th May 2009
Peter,

I too spent some time on this, and I asked myself what is the reason for
this question.

Is it because that he wants to get all doc and docx files and that.

Then I remembered me all that went wrong with real audio files in past.
There were some with the name Rar as I remember it me well.

Therefore I replied in a question.

Maybe not the best thing, but I am born in area where that is often done to
give in fact an answer.

:-)

Cor

"Peter Duniho" <(E-Mail Removed)> wrote in message
news(E-Mail Removed)...
> On Sat, 09 May 2009 00:58:01 -0700, Ray Mitchell
> <RayMitchell_NOSPAM_@meanoldteacher.com> wrote:
>
>> [...]
>>> And what about by instance .RA (real audio)

>>
>> Cor,
>>
>> I'm not sure what you're telling me.

>
> I think he's asking if you have the same problem with (for example)
> two-character extensions. I'm assuming the answer to that would be "no".


 
Reply With Quote
 
Cor Ligthert[MVP]
Guest
Posts: n/a
 
      10th May 2009
Peter,

Maybe I was missing the point, I was reading it that the pattern was 3 or
more characters.

For that I was replying.

Maybe wrong and should I have tested it, but because that is something
everybody can, I did not do.

Cor

 
Reply With Quote
 
Cor Ligthert[MVP]
Guest
Posts: n/a
 
      10th May 2009
Peter,

Maybe I was missing the point, I was reading it that the pattern was 3 or
more characters.

For that I was replying.

Maybe wrong and should I have tested it, but because that is something
everybody can, I did not do.

Cor

 
Reply With Quote
 
 
 
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
DirectoryInfo.GetFiles with 3-character extensions Ray Mitchell Microsoft C# .NET 0 9th May 2009 08:01 AM
Directory.GetFiles() / DirectoryInfo.GetFiles() on a remote server =?Utf-8?B?RGFuaWVsIENvcnLDqmE=?= Microsoft ASP .NET 2 24th Mar 2007 06:59 PM
DirectoryInfo.GetFiles CJ Taylor Microsoft VB .NET 5 4th Nov 2003 05:27 PM
DirectoryInfo.GetFiles() Pluto Microsoft C# .NET 4 9th Oct 2003 03:49 AM
DirectoryInfo.GetFiles Paul K Microsoft Dot NET Framework 5 31st Jul 2003 11:05 PM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 09:19 PM.