منتدى فيجوال بيسك لكل العرب | منتدى المبرمجين العرب
نسخ .. انشاء ... الغاء ...اعاده تسميه مجلد folderمعين فيجوال بيسك - نسخة قابلة للطباعة

+- منتدى فيجوال بيسك لكل العرب | منتدى المبرمجين العرب (http://vb4arb.com/vb)
+-- قسم : الأقسام التعليمية - المنتدى القديم (http://vb4arb.com/vb/forumdisplay.php?fid=90)
+--- قسم : مكتبة أكواد المنتدى (http://vb4arb.com/vb/forumdisplay.php?fid=111)
+---- قسم : مكتبة أكواد .net (http://vb4arb.com/vb/forumdisplay.php?fid=117)
+---- الموضوع : نسخ .. انشاء ... الغاء ...اعاده تسميه مجلد folderمعين فيجوال بيسك (/showthread.php?tid=6218)



نسخ .. انشاء ... الغاء ...اعاده تسميه مجلد folderمعين فيجوال بيسك - RaggiTech - 17-10-12

كاتب الموضوع : AhmedEssawy


كود :
'

'Copy, Create, Delete, and Renaming a Directory.


'


Dim dir As String = "c:\Directory"


'


'Create a directory with the path and name specified in the dir string variable.


My.Computer.FileSystem.CreateDirectory(dir)


'


'New directory with the contents of the dir path copied to it. </span></p>


My.Computer.FileSystem.CopyDirectory(dir, "c:\Directory Copied")


'


'Rename the original directory that is specified in the dir variable to the new directory name.


My.Computer.FileSystem.RenameDirectory(dir, "Directory Renamed")


'


'Delete both the Copy Directory and the Renamed Directory from the harddrive.</span></p>


My.Computer.FileSystem.DeleteDirectory("c:\Directory Copied", _


FileIO.DeleteDirectoryOption.DeleteAllContents)


My.Computer.FileSystem.DeleteDirectory("Directory Renamed", FileIO.UIOption.AllDialogs, _


FileIO.RecycleOption.SendToRecycleBin, FileIO.UICancelOption.DoNothing)