in reply to File Attributes in Win32
The '||' will use 0 to do the compair if -A $file is null (and no more warning).if (-A $file || 0 > 30)
Update: I don't know why I missed this (thanks to the people below who brought it up). '-A $file' is returning false because you are getting a directory listing for a directory and then checking the files in the current directory. Use this if statement:
Then you don't even need the '|| 0'.if (-A "$dirPath\\$file")
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
(tye)Re: File Attributes in Win32
by tye (Sage) on May 01, 2001 at 19:39 UTC |