Modify

Opened 16 years ago

Closed 16 years ago

#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


Change History (2)

comment:1 Changed 16 years ago by PHolzwarth@…

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

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

Sorry. Peter.

comment:2 Changed 16 years ago by Jos

  • Resolution set to No Bug
  • Status changed from new to closed

Guidelines for posting comments:

  • You cannot re-open a ticket but you may still leave a comment if you have additional information to add.
  • In-depth discussions should take place on the forum.

For more information see the full version of the ticket guidelines here.

Add Comment

Author


E-mail address and user name can be saved in the Preferences.

 
Note: See TracTickets for help on using tickets.