VBcoders Guest



Don't have an account yet? Register
 


Forgot Password?



Remove a directory from your hard drive

by Brandon (46 Submissions)
Category: Windows System Services
Compatability: VB 6.0
Difficulty: Unknown Difficulty
Originally Published: Wed 7th November 2001
Date Added: Mon 8th February 2021
Rating: (1 Votes)

Remove a directory from your hard drive

Rate Remove a directory from your hard drive




Private Sub Command1_Click ()
'remove specified directory
On Error Goto ErrHandler:
strDirectory = InputBox("Enter the directory you wish to remove","Directory")
'remove directory
RmDir (strDirectory)
Msgbox "Directory " & strDirectory & " has been removed", vbSystemModal + vbOkOnly, "Directory Removed"
ErrHandler:
Msgbox Err.Number & "This directory does not exist, please re-enter a valid path", vbExclamation + vbOkOnly,"Invalid Directory"
End Sub

Download this snippet    Add to My Saved Code

Remove a directory from your hard drive Comments

No comments have been posted about Remove a directory from your hard drive. Why not be the first to post a comment about Remove a directory from your hard drive.

Post your comment

Subject:
Message:
0/1000 characters