Multiple patterns in directory commands

Got an idea for enhancing PureBasic? New command(s) you'd like to see?
Derek
Addict
Addict
Posts: 2354
Joined: Wed Apr 07, 2004 12:51 am
Location: England

Multiple patterns in directory commands

Post by Derek »

Would be handy to have multiple paterns in the directory searching commands, so for example you can find all the jpeg's+bmp's+tiff's in one go without having to examine the extensions yourself.

Code: Select all

Directory$ = "c:\"
If ExamineDirectory(0, Directory$, "*.sys")  ;*.sys works  *.sys;*.bat finds nothing
  While NextDirectoryEntry(0)
    If DirectoryEntryType(0) = #PB_DirectoryEntry_File
      Type$ = " [File] "
    Else
      Type$ = " [Sub-Dir] "
    EndIf
    Debug DirectoryEntryName(0) + Type$ + "- Size in byte: " + Str(DirectoryEntrySize(0))
  Wend
  FinishDirectory(0)
EndIf
AND51
Addict
Addict
Posts: 1040
Joined: Sun Oct 15, 2006 8:56 pm
Location: Germany
Contact:

Post by AND51 »

PB 4.30

Code: Select all

onErrorGoto(?Fred)
Derek
Addict
Addict
Posts: 2354
Joined: Wed Apr 07, 2004 12:51 am
Location: England

Post by Derek »

Ah, did a quick search but didn't notice/find the request. :oops:
AND51
Addict
Addict
Posts: 1040
Joined: Sun Oct 15, 2006 8:56 pm
Location: Germany
Contact:

Post by AND51 »

Even my post was a second one: It has already been requested before I did it.

But this does not matter: It's just a reminder for Fred. :wink:
PB 4.30

Code: Select all

onErrorGoto(?Fred)
User avatar
Joakim Christiansen
Addict
Addict
Posts: 2452
Joined: Wed Dec 22, 2004 4:12 pm
Location: Norway
Contact:

Post by Joakim Christiansen »

Yeah, I second this.
I like logic, hence I dislike humans but love computers.
Dare
Addict
Addict
Posts: 1965
Joined: Mon May 29, 2006 1:01 am
Location: Outback

Post by Dare »

I support this request.
Dare2 cut down to size
User avatar
nco2k
Addict
Addict
Posts: 1344
Joined: Mon Sep 15, 2003 5:55 am

Post by nco2k »

i was requesting this a long time ago. fred said that he likes the idea. i guess its just a matter of time.

c ya,
nco2k
If OSVersion() = #PB_OS_Windows_ME : End : EndIf
Post Reply