Hi there
I've written an application which processes files that are scanned into a directory. Sometimes however the files get placed there from a cd and end up being 'readonly'.
Basically what i want to do is check if a file is readonly and change it before i process it.
Dim dir As DirectoryInfo = New DirectoryInfo(strDrawingLocations)
Dim fsi As FileSystemInfo
Dim strFileName As String
Dim ofos As New Scripting.FileSystemObject()
For Each fsi In dir.GetFileSystemInfos()
If fsi.Attributes.ReadOnly = FileAttributes.ReadOnly Then
End If
Next
what do i put in the If statement to change the readonly property?
Thanks in advance
Transcend
I've written an application which processes files that are scanned into a directory. Sometimes however the files get placed there from a cd and end up being 'readonly'.
Basically what i want to do is check if a file is readonly and change it before i process it.
Dim dir As DirectoryInfo = New DirectoryInfo(strDrawingLocations)
Dim fsi As FileSystemInfo
Dim strFileName As String
Dim ofos As New Scripting.FileSystemObject()
For Each fsi In dir.GetFileSystemInfos()
If fsi.Attributes.ReadOnly = FileAttributes.ReadOnly Then
End If
Next
what do i put in the If statement to change the readonly property?
Thanks in advance
Transcend