03-10-12, 01:55 AM
كاتب الموضوع : جهاد العريقي
هذة بعض اومر التعامل مع الملفاتكود :
Dim objFile As System.IO.File
' Check for existence of a file
Dim blnExists As Boolean
blnExists = objFile.Exists("c:\unlikely.txt")
' Delete a file
objFile.Delete("c:\goodbye.txt")
' Copy a file
objFile.Copy("c:\source.txt", "e:\destination.txt")
' Move a file
objFile.Move("c:\oldlocation.txt", "e:\newlocation.txt")
' Check whether a file is read-only
Dim blnReadOnly As Boolean
blnReadOnly = CType(objFile.GetAttributes("c:\readonly.txt").ReadOnly, Boolean)
' Check whether a file is hidden
Dim blnHidden As Boolean
blnHidden = CType(objFile.GetAttributes("c:\hidden.txt").Hidden, Boolean)
' Check a file creation date
Dim datCreated As DateTime
datCreated = objFile.GetCreationTime("c:\created.txt")