Wednesday, 14 March 2012

vb.net move a directory in ?


How to move a directory in vb.net?

In this tutorial you can learn how to move a directory (move directory one place to another place), move content directory to another directory using vb.net.

Syntax:
First you have to import system.io then

Directory.move(source_path,destination_path )

Source_path: which directory should move that path?
Destination_path: where the path should keep

  Ex:”c:\newtest “,c:\newfolder1\new  move the content in newtest  to new directory

To do this event following steps should follow if you know ignore these steps

Step1:
Drag and drop button1, label1, 2, textbox1, 2
Button1àcheck
Label1àenter the path
Labelàeg:c:\newfolder

Step2:
Double click the button and copy and paste the following code

Code:
Imports System.IO

Public Class Form1

    Private SubButton1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) HandlesButton1.Click
        Directory.Move(TextBox1.Text, TextBox2.Text)
    End Sub
End Class



Optput:


No comments:

Post a Comment