| View previous topic :: View next topic |
| Author |
Message |
sunil21 Newbie
Joined: 23 Dec 2003 Posts: 8
|
Posted: Jan 3rd, 2004 01:36 PM Post subject: directory |
|
|
| How can i remove a non empty directory |
|
| Back to top |
|
P.T.A.M. Administrator

Joined: 08 Oct 2003 Posts: 752 Location: Greece
|
Posted: Jan 3rd, 2004 03:19 PM Post subject: |
|
|
You first need to delete all the files in the folder and then use RmDir. I haven't tested this but it should work :
| Code: | Private Sub RemoveFoler(sFolderPath As String)
If Right$(sFolderPath, 1) <> "\" Then sFolderPath = sFolderPath & "\"
Kill sFolderPath & "\*.*"
RmDir sFolderPath
End Sub |
_________________ No one is completely useless. They can at least be an example of what to avoid. |
|
| Back to top |
|
|