Hello Herfried,
Thank you for your help but I have been trying this and it does not
work. Any other suggestions? Here is the function I have been using. This is
in a module. It always returns a false.
Imports System.IO
Public Function CheckEncrypt(ByVal fname As String)
Dim eFlag As Boolean = False
If (File.GetAttributes(fname) And FileAttributes.Encrypted) =
FileAttributes.Encrypted Then
eFlag = True
End If
Return eFlag
End Function
The file is one that I saved with cryptostream. Am I suppose to set the
encryption attribute when saving? I have even tried setting it using
File.SetAttributes(fname, File.GetAttributes(fname) Or
FileAttributes.Encrypted)
but it did not work either.
Thank you,
Debbie
"Herfried K. Wagner [MVP]" <hi***************@gmx.at> wrote in message
news:%2****************@tk2msftngp13.phx.gbl...
"Debbie Carter" <dc*********@sbcglobal.net> schrieb: Would anyone know how to read the file attributes of a file on the hard
drive to check if the file is encrypted or not?
\\\
Imports System.IO
.
.
.
If File.GetAttributes(FileName) And FileAttributes.Encrypted) =
FileAttributes.Encrypted Then
...
End If
///
--
M S Herfried K. Wagner
M V P <URL:http://dotnet.mvps.org/>
V B <URL:http://dotnet.mvps.org/dotnet/faqs/>