How can I figure if a file has a read only property checked?
Thank you!
Alex!
Printable View
How can I figure if a file has a read only property checked?
Thank you!
Alex!
set a reference to the Microsoft Scripting Runtime and use code similar to this:
Dim fso as Scripting.FileSystemObject
Dim ofile as Scripting.File
set fso = new Scripting.FileSystemObject
set ofile = fso.GetFile("C:\yourfile.txt")
MsgBox ofile.Attributes = ReadOnly
set ofile = nothing
set FSO = nothing
Hope this helps,
John
John Pirkey
MCSD
www.ShallowWaterSystems.com