mike mcintyre's

.N e t J o u r n a l

vbCity Blogs moved to:
http://cs.vbcity.com/blogs
  Home :: Syndication  :: Login

OctNovember 2009Dec
SMTWTFS
25262728293031
1234567
891011121314
15161718192021
22232425262728
293012345

Archives

Topics

Source Code

My makes it easy to use .Net. Here's an example that uses My to rename a file:

Syntax:

Public Shared Sub RenameFile ( _
    file As String, _
    newName As String _
)
file is the file path to the file to be renamed.

newName is the new name (with file extentsion) to be given to the file.

Example:

My.Computer.FileSystem.RenameFile("C:\OldName.txt", "NewName.txt")

 

Mike McIntyre
Get Dot Net Code
posted on Sunday, October 19, 2008 1:38 PM