Change extension of file using vb.net

1 comment

Change extension of file using vb.net
How can I change extension of file using vb.net

here
example    ahsan.txt rename as  ahsan.png or ahsan.doc

import system.io
ex:1
Dim path as String = "c:\ahsan.txt"
Dim ChangeEx as String ="c:\ahsan.doc"

System.IO.File.Move(path,ChangeEx)

ex:2
System.IO.File.Move("SoftwareData\DatabaseFiles.accdb", SoftwareData\DatabaseFiles.Files")

1 comment :