Search Tools Links Login

How to RENAME or MOVE file with Vb???

Visual Basic 6, or VB Classic

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

Original Author: JJJJJJJJ


' Auther : Jim Jose
' Email  :
' Purpose : File renaming with vb
' Very Easy..
' >>>Name [Source] As [Destination]<<<
Private Sub cmdTest_Click()

'Rename file in D:About.txt to D:Me.txt
Name "D:About.txt" As "D:Me.txt"

'Movefile file from D:About.txt to C:About.txt
Name "D:About.txt" As "C:About.txt"
'Thats it... So never use FileCopy..
'with Kill.. to rename files.
'Jim Jose :-))
End Sub

About this post

Posted: 2002-06-01
By: ArchiveBot
Viewed: 113 times


Visual Basic 6


No attachments for this post

Loading Comments ...


No comments have been added for this post.

You must be logged in to make a comment.