Hello all

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.

Any suggestions?

code:
  

Break on

$Dir = "c:\testdir"

$File = Dir("$Dir")

While @Error = 0

$Attrib = GetFileAttr($File) & 16

? "Filename = '$File' Attribute = $Attrib"

?

$File = Dir()

Loop

All I need to do is to be able to distinguish a file from a directory.

I tested this section of the script on Windows XP Home and got the incorrect values.

Thanks in advance
_________________________
Kevin Cowans Senior ICT Technician The Armthorpe School