? vb.net亚博优惠活动之directory对象 亚博优惠活动,亚博体育网页版,亚博app怎么下载「官网直营」
VB.net 2010 视频亚博优惠活动 VB.net 2010 视频亚博优惠活动 VB.net 2010 视频亚博优惠活动
SQL Server 2008 视频亚博优惠活动 c#入门经典亚博优惠活动 Visual Basic从门到精通视频亚博优惠活动
  • vb.net亚博优惠活动之directory对象

  • 2015-01-18 15:17 来源:未知
directory对象(相关vb.net亚博优惠活动)
作用:完成文件夹的创建、删除等操作。
命名空间:system.io.directory
常用方法:
CreateDirectory:创建
Delete:删除
Move:移动
应用实例:文件夹的创建、删除、移动(同盘内)操作。程序见,directory对象及操作[实验报告44]
程序为:
Public Class Form1
??? Dim s, ss As String
??? Dim d As System.IO.Directory
?
??? Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
??????? s = InputBox("请输入要创建的文件夹", "目标文件夹")
??????? TextBox1.Text = s
??????? d.CreateDirectory(s)
??? End Sub
?
?????? Private Sub Button2_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button2.Click
??????? s = InputBox("请输入要删除的文件夹", "删除文件夹")
??????? TextBox1.Text = s
??????? d.Delete(s)
??? End Sub
?
??? Private Sub Button3_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button3.Click
??????? s = InputBox("请输入要移动的文件夹", "源文件夹")
??????? TextBox1.Text = s
??????? ss = InputBox("请输入要移动到的目标文件夹", "目标文件夹")
??????? TextBox2.Text = ss
??????? d.Move(s, ss)
??? End Sub
Private Sub Button4_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button4.Click
??????? End
??? End Sub
End Class

相关亚博优惠活动