How to move file from one directory to another in VB.NET

1 Answer

0 votes
Imports System.IO

Module Module1

    Sub Main()

        Dim s As String

        Try

            If File.Exists("d:\\data.bin") = True Then

                File.Move("d:\\data.bin", "d:\\test\\data.bin")
                Console.WriteLine("move success")

            End If

        Catch iex As IOException

            Console.WriteLine(iex.Message)

        End Try

    End Sub

    'run:
    ' 
    'move success

End Module

 



answered Aug 29, 2015 by avibootz

Related questions

1 answer 242 views
1 answer 191 views
2 answers 228 views
3 answers 282 views
3 answers 268 views
1 answer 263 views
3 answers 324 views
...