File.SetAttributes problem
- From: "Bruce Lawson" <b.lawson@xxxxxxxxxx>
- Date: Mon, 27 Feb 2006 23:08:44 -0500
Hi All,
I've modified a simple Aspnet program from a text to show file information,
including attributes and I keep getting an error which I cannot seem to
solve; here's the important parts:
Imports System
Imports System.IO
Imports System.IO.DirectoryInfo
Imports System.IO.File
Imports System.IO.FileAttributes
............
Private Sub PageLoad()
Dim f as new FileInfo("file path")............
'change file attributes to hidden or archive just for kix
'File.SetAttributes(path, FileAttributes.Archive)
'File.SetAttributes(path, FileAttributes.Hidden)
'f.Attributes = 2
'f.Attributes = FileAttributes.Hidden
'none of these work,
The program compiles fine, but kicks out on run with this error:
System.ArgumentException: Invalid File or Directory attributes value. When
the error lines above are commented out, the program runs fine. Any help is
much appreciated.
BruceL
.
- Prev by Date: Re: Database String
- Next by Date: Re: export directly to excel file without prompting user
- Previous by thread: Database String
- Next by thread: Login Redirect & Sub Directory
- Index(es):