How to delete a Windows directory?

BrianMc1958
BrianMc1958 used Ask the Experts™
on
Dear Experts,

Anyone know how to delete a Windows directory using Java?

Thanks,
BrianMc1958
Comment
Watch Question

Do more with

Expert Office
EXPERT OFFICE® is a registered trademark of EXPERTS EXCHANGE®
Top Expert 2016
Commented:
new File("somedir").delete();

Author

Commented:
Thanks.
Top Expert 2016

Commented:
:-)

Bear in mind it's got to be empty for that to work

Do more with

Expert Office
Submit tech questions to Ask the Experts™ at any time to receive solutions, advice, and new ideas from leading industry professionals.

Start 7-Day Free Trial