Opened 15 years ago

Closed 15 years ago

Last modified 15 years ago

#834 closed Feature Request (Rejected)

Request for _FileListToArray() to offer additional options

Reported by: Rudi Owned by:
Milestone: Component: AutoIt
Version: Severity: None
Keywords: Cc:



It would be nice, if the native _FileListToArray() would offer the options of a UDF I found quite a time ago in the AI forum.

Authors: randallc ; modified from SolidSnake and big_daddy and SmoKE_N and GEOsoft!

; _FileListToArrayFaster1e.au3
#include<array.au3>;for _ArrayToString() and _ArrayInsert()
; Description: lists all files and folders in a specified path
; Syntax: _FileListToArray($s_Path, $s_Filter = "*", $i_Flag = 0)
; Parameter(s): $s_Path = Path to generate filelist for
; $s_Filter = The filter to use. Search the Autoit3 manual for the word "WildCards" For details
; $i_Flag = determines whether to return file or folders or both
; $i_Flag=0(Default) Return both files and folders
; $i_Flag=1 Return files Only
; $i_Flag=2 Return Folders Only
; $i_Recurse = Indicate whether recursion to subfolders required
; $i_Recurse=0(Default) No recursion to subfolders
; $i_Recurse=1 recursion to subfolders
; $i_BaseDir = Indicate whether base directory name included in returned elements
; $i_BaseDir=0 base directory name not included
; $i_BaseDir=1 (Default) base directory name included
; $s_Exclude= The Exclude filter to use. "WildCards" For details
; Requirement(s): None
; Return Value(s): On Success - Returns an array containing the list of files and folders in the specified path
; On Failure - Returns the an empty string "" if no files are found and sets @Error on errors
; @Error=1 Path not found or invalid
; @Error=2 Invalid $s_Filter
; @Error=3 Invalid $i_Flag
; @Error=4 No File(s) Found
; Author(s): randallc <randallc@…>; modified from SolidSnake and big_daddy and SmoKE_N and GEOsoft!
; Note(s): The array returned is one-dimensional and is made up as follows:
; $array[0] = Number of Files\Folders returned
; $array[1] = 1st File\Folder
; $array[2] = 2nd File\Folder
; $array[3] = 3rd File\Folder
; $array[n] = nth File\Folder

Searching the Autoit Forum for that UDF doesn't return any results right now, so I'll attach that UDF with this feature request.

Regards, Rudi.

Attachments (1)

_FileListToArrayFaster1e.au3 (25.1 KB) - added by Rudi 15 years ago.

Download all attachments as: .zip

Change History (5)

Changed 15 years ago by Rudi


comment:1 Changed 15 years ago by TicketCleanup

  • Version deleted

Automatic ticket cleanup.

comment:2 follow-up: Changed 15 years ago by Valik

  • Resolution set to Rejected
  • Status changed from new to closed

I think that's a little overkill.

comment:3 in reply to: ↑ 2 Changed 15 years ago by anonymous

Replying to Valik:

I think that's a little overkill.

Hi Valik.

Hm. It's a pitty. I believe, that many other Autoit users have problems to code recursion. Not everybody has your coding skills...

As in the general help forums questions upon recursion show up time by time I think others would be happy with such features -- like I would ;)

It could be in a separate include file, e.g. <filerecursion.au3>, then there wouldn't be an impact to the size of file.au3 or array.au3.

Regards, Rudi.

PS: I've added that reply some minutes ago. It *WAS* shown in the ticket dialog, but is gone again? Was the reply deleted, or did I miss something?

comment:4 Changed 15 years ago by Zedna

I like that idea too.
It can be added as new _FileListToArrayEx() function:

_FileListToArrayEx($s_Path, $s_Filter = "*", $i_Flag = 0, $i_Recurse = 0, $i_BaseDir = 1, $s_Exclude = "")

Note: I can't "reopen this ticket" :-(

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

Modify Ticket

as closed The ticket will remain with no owner.

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

Note: See TracTickets for help on using tickets.