Mailing List Archive: 49091 messages
  • Home
  • Script library
  • AltME Archive
  • Mailing list
  • Articles Index
  • Site search

[REBOL] Re: Filtering files in directories.

From: rebol-list2:seznam:cz at: 3-Jan-2003 12:16

Hello Gregg, Thursday, January 2, 2003, 7:48:18 PM, you wrote: GI> Hi Ed, ED>> How do I get only specified files in a directory? IOW, how do I do the ED>> equivalent of pattern matching, if I want all JPG files, how do I return ED>> only *.jpg? ED>> So far, all the examples I have found involve loading all the files ED>> first and then extracting the ones you need or not from the series that ED>> is returned. GI> You can open a directory port directly if you want, though I don't GI> think it will gain you much in this case. Under Windows you can use GI> the FindFirstFile and FindNextFile APIs but that locks you in to the GI> OS. GI> Is performance an issue, or is it just curiosity? GI> -- Gregg I've tried to open very large directory (more then 2700 files) directly using: files: open/direct %very/large/dir/ and it looks that the output is buffered as well (at least when I use "? dir" I can see all the dir file names in the dir/state/inBuffer so you can use: forall files [probe files/1] ;to list all file names close files but it looks it's same as simple: files: read %very/large/dir/ the open/skip on directory is not working as well =( Oliva David )=======================( [oliva--david--seznam--cz] )== =( Earth/Europe/Czech_Republic/Brno )============================= =( coords: [lat: 49.22 long: 16.67] )=============================