Can't rename file

J

John Howard

I am attempting to rename a file in VB.net using the MSDN rename function
example at

http://msdn.microsoft.com/library/default.asp?url=/library/en-us/vblr7/html/vafctrename.asp

My code looks like this:

Imports System.IO

..

..

..

Dim OldName As String = "C:\PDB\Development\Database\PDB.mdb"

Dim NewName As String = "C:\PDB\Development\Database\OldPDB.mdb"

Rename(OldName, NewName)

When the rename is executed, I get:

Procedure call or argument is not valid

Any ideas?

TIA,

John
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top