Visual LISP, AutoLISP and General Customization
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic to the Top
- Bookmark
- Subscribe
- Printer Friendly Page
Delete folder command
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Highlight
- Email to a Friend
- Report Inappropriate Content
Hi everybody
I need to delete a folder (not empty) in my LISP routine and I’m not being able to do so. I created the folder using (vl-mkdir “foldername”) but I don’t find the equivalent command to remove it. Any help?
Thanks
Nuno
Solved! Go to Solution.
Re: Delete folder command
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Highlight
- Email to a Friend
- Report Inappropriate Content
This delete the folder and its content:
(setq FSO (vlax-create-object "Scripting.FileSystemObject"))
(vlax-invoke FSO "DeleteFolder" "D:\\folder1\\folder2\\Prog\\AutoLISP\\deletme" :vlax-true)
at the end release the FSO:
(vlax-release-object FSO)
Hope this helps.
Justo Aguiar.
Re: Delete folder command
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Highlight
- Email to a Friend
- Report Inappropriate Content
Hello Just Aguiar,
It works perfectly. I just change from absolute path to local path (vlax-invoke FSO "DeleteFolder" ".\\foldername" :vlax-true). Problem solved!
Thanks
Nuno
Re: Delete folder command
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Highlight
- Email to a Friend
- Report Inappropriate Content
Any way to use a while card?
I want to delete all the Background Plot folders.
For me they are created in C:\Temp\BGPlot_2552 but the number varies.
Please let me know.

