VBcoders Guest



Don't have an account yet? Register
 


Forgot Password?



Rename a file or a directory in VB

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

Rate Rename a file or a directory in VB

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

Download this snippet    Add to My Saved Code

Rename a file or a directory in VB Comments

No comments have been posted about Rename a file or a directory in VB. Why not be the first to post a comment about Rename a file or a directory in VB.

Post your comment

Subject:
Message:
0/1000 characters