Re: Delete folder
- From: "TedF" <NoReply@xxxxxxxxxx>
- Date: Fri, 30 Dec 2005 09:02:14 -0800
If the directory is empty then RmDir works fine.
If the directory has files then you need to Kill all
files in the directory then use RmDir
This will give error if any of the files are in use, so
you need to add error handling.
Kill "C:\Temp\*.*"
RmDir "C:\Temp"
If the directory has files and sub directories then better
use the SHFileOperation API, with option to delete to
the Recycle Bin or not. The API has it is own error handling.
"David" <dlchase@xxxxxxxxxxxxxxx> wrote in message
news:eWP0eYVDGHA.208@xxxxxxxxxxxxxxxxxxxxxxx
> Is there any built-in function in VB6 that allows me to delete a folder on
> the network without using filesystemobject? I have a routine that moves
> files from one folder to another and I need to remove the "source" folder
> after all files are moved to the "destination" folder. I know there is a
> Kill command but that is for files. Thanks.
>
> David
>
.
- Follow-Ups:
- Re: Delete folder
- From: Randy Birch
- Re: Delete folder
- References:
- Delete folder
- From: David
- Delete folder
- Prev by Date: Re: Subclassing compilation crash
- Next by Date: Detecting compilation?
- Previous by thread: Re: Delete folder
- Next by thread: Re: Delete folder
- Index(es):
Relevant Pages
|