Modify

Opened 17 years ago

Closed 17 years ago

Last modified 17 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:

Description

Hi.

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-once
#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
;
;===============================================================================
[snip]


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 17 years ago.
_FileListToArrayFaster1e.au3

Download all attachments as: .zip

Change History (5)

by Rudi, 17 years ago

_FileListToArrayFaster1e.au3

comment:1 by TicketCleanup, 17 years ago

Version: 3.3.0.0

Automatic ticket cleanup.

comment:2 by Valik, 17 years ago

Resolution: Rejected
Status: newclosed

I think that's a little overkill.

in reply to:  2 comment:3 by anonymous, 17 years ago

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 by Zedna, 17 years ago

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" :-(

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.