by VB Author (1 Submission)
Category: Miscellaneous
Compatability: Visual Basic 3.0
Difficulty: Unknown Difficulty
Date Added: Wed 3rd February 2021
Rating: (3 Votes)
Rename a file or a directory in VB just in one line of code
Inputs
1 CommandButton
Private Sub Command1_Click()
' To rename a file
Name "c:\windows\win.com" As "c:\windows\rubbish.exe"
' To rename a directory
Name "c:\windows" As "c:\rubbish"
End Sub