VBcoders Guest



Don't have an account yet? Register
 


Forgot Password?



How to RENAME or MOVE file with Vb???

by JJJJJJJJ (41 Submissions)
Category: Coding Standards
Difficulty: Beginner
Date Added: Wed 3rd February 2021
Rating: (7 Votes)

After some quick search I realized that very few in VBC knows how to rename file with VB. So here it is...

Rate How to RENAME or MOVE file with Vb???

'------------------------------------------------
' Auther : Jim Jose
' Email  : [email protected]
' Purpose : File renaming with vb
'------------------------------------------------
' Very Easy..
' >>>Name [Source] As [Destination]<<<
'------------------------------------------------
Private Sub cmdTest_Click()
 
 'SampleCode:
 'Rename file in D:\About.txt to D:\Me.txt
 'Use...
 Name "D:\About.txt" As "D:\Me.txt"
 
 'SampleCode:
 'Movefile file from D:\About.txt to C:\About.txt
 'Use...
 Name "D:\About.txt" As "C:\About.txt"
 'Thats it... So never use FileCopy..
 'with Kill.. to rename files.
 'Jim Jose :-))
End Sub

Download this snippet    Add to My Saved Code

How to RENAME or MOVE file with Vb??? Comments

No comments have been posted about How to RENAME or MOVE file with Vb???. Why not be the first to post a comment about How to RENAME or MOVE file with Vb???.

Post your comment

Subject:
Message:
0/1000 characters