I am starting a script to move some directories from one location on our server (Server 2000) to another and have run into a problem.
The following code returns the File Attributes incorrectly.
If I fill in the $Dir variable with a test directory that contains various files and directories the script does not seem to return the correct values.
code:All I need to do is to be able to distinguish a file from a directory.
$Dir = "c:\testdir"
$File = Dir("$Dir")
While @Error = 0
$Attrib = GetFileAttr($File) & 16
? "Filename = '$File' Attribute = $Attrib"
$File = Dir()
I tested this section of the script on Windows XP Home and got the incorrect values.
Thanks in advance
Senior ICT Technician
The Armthorpe School