Click to See Complete Forum and Search --> : Is it read only


alexK
February 11th, 2000, 01:45 PM
How can I figure if a file has a read only property checked?
Thank you!
Alex!

Johnny101
February 11th, 2000, 02:04 PM
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