Re: Traversing directory and checking attributes

new topic     » goto parent     » topic index » view thread      » older message » newer message

Hello Marcus,

Welcome to Euphoria!

The walk_dir function was one of the reasons Euphoria caught my eye when I
was looking for a language that would run on both Windows and Linux.  I've
never done any benchmarking myself but up against Perl I'd have my money on
Euphoria any day of the week!

The Euphoria User Contribution archive:

  http://www.rapideuphoria.com/archive.htm

will contain many examples of how to use walk_dir but I'll plug mine first
:-]  It's a little utility called "id3adder" that recurses down one of more
directory structures looking for MP3 files.  For each MP3 file it writes
ID3v2 tags into it.  Here is the archive link:

  http://www.rapideuphoria.com/cgi-bin/search.cgi?keywords=id3adder

The download is only 10k (zipped) which includes documentation.  The bits
you'll be interested in code-wise are the calls to walk_dir in the "main()"
function and the function "look_at()".  Read the Euphoria documentation on
walk_dir as well - it's all pretty easy - much easier than Perl!

Regards,

FP.

At 04:39 PM 1/21/02 +0100, you wrote:
>
>Hi,
>
>I'm new to the Euphoria language. I've written a routine that is too
>slow in Perl and hope Euphoria is faster. I guess this is partly basic
>stuff.
>
>I need to traverse a directory tree, say C:\, and get the filenames,
>directory names.
>
>Then I need to get the status of the file attributes archive/read/ etc
>
>Does anybody have such code already, so I can see whether Euphoria
>might be faster?
>
>Thanks,
>
>Marcus
>
>
>
>

new topic     » goto parent     » topic index » view thread      » older message » newer message

Search



Quick Links

User menu

Not signed in.

Misc Menu