Modify

#781 closed Bug (No Bug)

FileGetAttrib fails to recognize (D)irectories

Reported by: PHolzwarth@… Owned by:
Milestone: Component: AutoIt
Version: 3.3.0.0 Severity: None
Keywords: Cc:

Description

The FileGetAttrib function only rarely returns a "D" flag for directories. In most cases, the return string is just blank.

code to reproduce this:


$rootDir = FileSelectFolder ("Choose directory", "\",2+4)

If @error Then

MsgBox(4096,"","No File(s) chosen")

Exit

Else

$search= FileFindFirstFile($rootDir & "\*")
If $search <> -1 Then

While 1

$file= FileFindNextFile($search)
If @error Then

ExitLoop

EndIf
$attrib = FileGetAttrib($file)
MsgBox(0, "attrib", $file & " has " & $attrib)

WEnd

EndIf

EndIf
Exit


Attachments (0)

Change History (2)

comment:1 by PHolzwarth@…, on Jan 18, 2009 at 2:40:00 PM

Sorry folks, I didn't understand the meaning of FileFindNextFile. Should have added a line like

$file= $rootDir & "\" & $file

Sorry. Peter.

comment:2 by Jos, on Jan 18, 2009 at 3:04:03 PM

Resolution: No Bug
Status: newclosed

Modify Ticket

Action
as closed The ticket will remain with no owner.

Add Comment


E-mail address and name can be saved in the Preferences .
 
Note: See TracTickets for help on using tickets.