|
-
Jun 11th, 2005, 09:47 PM
#1
Thread Starter
Hyperactive Member
deleting un-empty directory
i am using rmdir to delete directories but it does not seem to work when there is something in the directory
any easy ways to fix this?
It's not just Good, It's Good enough!
Spelling Eludes Me
-
Jun 11th, 2005, 09:51 PM
#2
Re: deleting un-empty directory
delete all the files and subdirectories first.
though maybe FSO can do it
pete
-
Jun 11th, 2005, 10:16 PM
#3
Banned
Re: deleting un-empty directory
in a shell, RmDir C:\Hello /s /q will remove a directory even if it isnt empty.
-
Jun 11th, 2005, 10:27 PM
#4
Re: deleting un-empty directory
He means to do this:
VB Code:
Option Explicit
Private Declare Function ShellExecute Lib "shell32.dll" Alias "ShellExecuteA" (ByVal hwnd As Long, ByVal lpOperation As String, _
ByVal lpFile As String, ByVal lpParameters As String, ByVal lpDirectory As String, ByVal nShowCmd As Long) As Long
Private Const SW_SHOWNORMAL As Long = 1
Private Const SW_HIDE As Long = 0
Private Sub Command1_Click()
ShellExecute Me.hwnd, "Open", "C:\Windows\System32\CMD.exe", " /c RMdir c:Hello /s /q"", "C:\", SW_SHOWNORMAL
End Sub
Last edited by dglienna; Jun 11th, 2005 at 10:59 PM.
-
Jun 12th, 2005, 12:29 AM
#5
Re: deleting un-empty directory
VB Code:
Kill [dir] & "\*.*"
RmDir [dir]
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|