Sign in to follow this  
Followers 0
chiners_68

DIRremove assistance

3 posts in this topic

I have a root directory which I know the name of but the directories below this vary.

I basically want to delete the directories below the root directory. The DIRremove only works if I delete the root directory which will reomvec all subdirectories but I cannot & do not want to remove this root directory.

any ideas?

Share this post


Link to post
Share on other sites



#2 ·  Posted (edited)

if you're being lazy about it you could create a dummy txt file in the root dir then set the file attributes to read only and then perform a dirremove on the root folder. change the txt attrib back, then delete.

or do it properly and loop through all of the sub folders and delete them.

-Blademonkey

Edited by blademonkey

---"Educate the Mind, Make Savage the Body" -Mao Tse Tung

Share this post


Link to post
Share on other sites

can you not just put a * for a wildcard folder i.e.

DIRremove("Root\*", 1)

Share this post


Link to post
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
Sign in to follow this  
Followers 0