Renaming an existing file

What's the easiest way to rename a file that already exists   I need to do this using System.IO.  If anyone can help me out, I would really appreciate.

Thanks


Answer this question

Renaming an existing file

  • Michael M. Emmons

    You'll want to use File.Move.  Simply move it to the same location with a new name.
  • Renaming an existing file