Hello.

Apologies if this subject has come up before but much searching hasn't produced anything of any use.

I currently have a program which reads data in from a specific file and then processes it etc etc but what I need to be able to do is somehow put a loop around the outside of the macro to run this for every file in the directory.

Surely this must be possible but I'm getting nowhere near knowing how to start even.

Any hints would be great (or if I haven't explained myself very well I can try and clarify; writing in any language isn't my strong point).

Thanks very much, Gen.

What operating system do you use?

I use Linux.

Search your man pages for opendir(3), closedir(3), and readdir(3). :)

Or one of these

Cheers very much.

Code is sorted now. Just got to persuade Root's interpreter it DOES know what dirent is and it will include it.

Thanks again.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.