Modify ↓
Opened 17 years ago
Closed 17 years ago
#781 closed Bug (No Bug)
FileGetAttrib fails to recognize (D)irectories
| Reported by: | 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 , 17 years ago
comment:2 by , 17 years ago
| Resolution: | → No Bug |
|---|---|
| Status: | new → closed |
Note:
See TracTickets
for help on using tickets.

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