chiners_68 Posted February 20, 2008 Posted February 20, 2008 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?
blademonkey Posted February 20, 2008 Posted February 20, 2008 (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 February 20, 2008 by blademonkey ---"Educate the Mind, Make Savage the Body" -Mao Tse Tung
chiners_68 Posted February 20, 2008 Author Posted February 20, 2008 can you not just put a * for a wildcard folder i.e. DIRremove("Root\*", 1)
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now