Jump to content

Deleting directories in win2000

Guest Guest_Napoleon

Recommended Posts

Guest Guest_Napoleon

I am trying to delete all files and subdirectories within a folder, but i do not want to delete the directory itself.

I tried DirRemove(), which deletes all files and subdirectories. Problem is it deletes the main directory.

FileDelete() deletes the files within the directory but does not delete the subdirectories and its files.

I need something that will delete all files within the main directory and all of its subdirectories (or at least all files within the subdirectories) without deleting the main directory.

Any help would be appreciated, 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

  • Recently Browsing   0 members

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