منتدى فيجوال بيسك لكل العرب | منتدى المبرمجين العرب

نسخة كاملة : نسخ .. انشاء ... الغاء ...اعاده تسميه مجلد folderمعين فيجوال بيسك
أنت حالياً تتصفح نسخة خفيفة من المنتدى . مشاهدة نسخة كاملة مع جميع الأشكال الجمالية .
كاتب الموضوع : 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)