Jump to content

enumerating directories (not recursive.. just 1 level)


 Share

Recommended Posts

I want to get a list of the directories in a directory to an array. I am going to use filefindfirstfile/next unless there is a better way. (know of any?)

So I have done that and I get the filenames and directories.

Now I am lost at how to detect if it is a directory or not... all I can think of is to change the directory and see if it succeeds... but obviously there must be a better. Please tell me what I am overlooking here.

Also, anyone know what function to use to get the filename only of a file? I mean strip the path? if there is not such a function, what regexp can I use to do this?

thanks

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...