deleting sub directories

Discussion of Inner Space

Moderators: Lavish Software Team, Moderators

Post Reply
Jon100
Non-Subscriber
Posts: 32
Joined: Wed Nov 24, 2004 1:38 pm

deleting sub directories

Post by Jon100 » Fri Jul 18, 2008 4:26 am

Does anyone have a neater way in LavishScript of deleting a directory, that contains subdirectories and files, than this code please?

Code: Select all

OSexecute cmd /c "rmdir /s/q c:\\mydirectorytree"
I don't like having to use cmd.exe as it flashes up a window, is slow, and might change in future. Does it work on Vista?

The lavishscript command "rmdir" won't delete subdirectories.

The only other way I can think of is to write a routine to iterate through all the subdirectories, deleting all the files (one-by-one), and then back up the directories deleting those too (one-by-one).
Jon100 / Dorset
"No of course I don't use that macro thingy to 6 box... I just use 6 keyboards at once..."

Post Reply