Jump to content
Xtreme .Net Talk

Recommended Posts

  • *Gurus*
Posted

Make a function which loops through all folders in a given directory and also all files. When it encounters a folder, make it call itself with that folder as well as performing any other actions you need.

 

I'm pretty sure there's an example in the vb.net code examples site I posted in the knowledge base.

MVP, Visual Developer - .NET

 

Now you see why evil will always triumph - because good is dumb.

 

My free .NET Windows Forms Controls and Articles

  • *Experts*
Posted

One thing to keep in mind though is that if you have a very large

drive, something like this will take absolutely ages to run start to

finish. Unless you are making some sort of virus scanner or

something that needs to look at all the files in one go, avoid this.

 

If you are making some kind of explorer, get all the folders in

C drive's root to start off. Then when the user opens another folder,

get the contents of that folder, etc etc.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...