Re: RmDir command generates an error 75 - Path/File access error
- From: "Larry Serflaten" <serflaten@xxxxxxxxxxxxxx>
- Date: Tue, 15 Aug 2006 20:13:30 -0500
"Michael C" <nospam@xxxxxxxxxx> wrote
How about letting Windows do what it knows how to do?
The command processor could do that job with very little hassle:
Private Sub RmDir(Path As String)
Dim cmd As String
Dim dos As String
dos = Environ$("COMSPEC")
cmd = "rmdir """ & Path & """ /s /q"
Shell dos & " /c " & cmd, vbHide
End Sub
Are you seriously suggesting opening a command prompt to do this?!?!?
You say that like its never been done before! Consider how much code you
would have to write to delete a directory tree, and then look again at the
three lines above. If I was Rick Rothstein, I would have put that in one
line of code.
One line of code to delete a directory, all of its subdirectories, and all of the
files in those directories. I'd say that's not a bad trade off.
In case you were not aware, the user would not see any difference.....
Also consider what people routinely add to their programs, just to get
a status bar, or progress bar:
COMCTL32.OCX 567K
CMD.EXE 232K
LFS
.
- Follow-Ups:
- Re: RmDir command generates an error 75 - Path/File access error
- From: Rick Rothstein \(MVP - VB\)
- Re: RmDir command generates an error 75 - Path/File access error
- From: Michael C
- Re: RmDir command generates an error 75 - Path/File access error
- References:
- RmDir command generates an error 75 - Path/File access error
- From: Carl Imthurn
- Re: RmDir command generates an error 75 - Path/File access error
- From: Larry Serflaten
- Re: RmDir command generates an error 75 - Path/File access error
- From: Michael C
- RmDir command generates an error 75 - Path/File access error
- Prev by Date: Re: DTPicker
- Next by Date: Software Testing & Quality Assurance FAQ
- Previous by thread: Re: RmDir command generates an error 75 - Path/File access error
- Next by thread: Re: RmDir command generates an error 75 - Path/File access error
- Index(es):
Relevant Pages
|