Really Easy: Renaming Files

This is probably really easy for you guys. How would I be able to rename Text1.Text\file.txt to something else, like Text1.Text\file.old?

Oh and also copying a file to the path of Text1.Text =)
LVL 2
AdiFAsked:
Who is Participating?

[Webinar] Streamline your web hosting managementRegister Today

x
 
VbmasterConnect With a Mentor Commented:
Use the Name statement as stated in the HelpFile

   Name oldfilename As newfilename

The Code you want to use is probably

   Name Text1.Text & "\file.txt" As Text1.Text & "\file.old"


Copy a file using the FileCopy statement, the syntax is

   FileCopy fromfilename, tofilename
0
 
AdiFAuthor Commented:
Edited text of question.
0
 
AdiFAuthor Commented:
Edited text of question.
0
All Courses

From novice to tech pro — start learning today.