Click here to Skip to main content
15,884,838 members
Please Sign up or sign in to vote.
1.00/5 (4 votes)
Hi all
VB
Dim source As String = "C:\Application\project_blank.bak"
 Dim dest As String = "C:\Application\" & txtCompanyCode.Text & "\"

these are my to string.
i need to copy the file, but before that i have to rename it as the same name of the value of the textbox.
e.g. if txtCompanyname.text contains value as AAA0001, then the .bak file should rename as that and copy to the folder.

Please tell me how to do that
Posted

1 solution

I already posted you a link to the File.Copy page in your other question. Please don't repost.
 
Share this answer
 
Comments
[no name] 17-May-13 7:16am    
i asked about renaming also.
Richard MacCutchan 17-May-13 7:41am    
Well I've given you the link to the Copy method; you should look at the rest of the methods available to see how to do it (hint Move is the same as Rename).

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900