|
-
Aug 30th, 2000, 09:05 AM
#1
Thread Starter
Lively Member
Hi
Does anyone know how to change a files properties. I need to change the read-only property on a file.
Cheers
IJ
-
Aug 30th, 2000, 09:27 AM
#2
Hyperactive Member
Maybe this will help
Code:
Private Declare Function SetFileAttributes Lib "kernel32" Alias "SetFileAttributesA" (ByVal lpFileName As String, ByVal dwFileAttributes As Long) As Long
Private Const FILE_ATTRIBUTE_NORMAL = &H80
Private Sub Form_Load()
Dim Tmp As Long
Tmp = SetFileAttributes("c:\FILENAME", FILE_ATTRIBUTE_NORMAL)
End Sub
there are some others attributes you can set too look in the MSDN - SetFileAttributes
WP
-
Aug 30th, 2000, 09:36 AM
#3
Thread Starter
Lively Member
Brilliant,
Appreciate it.
IJ
-
Aug 30th, 2000, 11:08 AM
#4
Hyperactive Member
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|