What is the best way to rename a file on the webserver through Code?

 Posted by Vishalneeraj-24503 on 2/4/2015 | Category: VB.NET Interview questions | Views: 2012 | Points: 40

Just write below code:-
first import System.IO namespace as:-

Import System.IO

File.Move("C:\file_name1", "C:\file_name2")

Where, file_name2 is renamed to file_name1.

Asked In: Many Interviews | Alert Moderator 

Comments or Responses

Login to post response