elite Posted February 21, 2006 Share Posted February 21, 2006 I've had a bit of a search for this but haven't turned up any conclusive results... How can I perform a function on each file in a directory - I'm guessing while or for, but I don't see how to put all of these in an array and iterate through them - or have I got the wrong end of the stick? TIA Link to comment Share on other sites More sharing options...
Valuater Posted February 21, 2006 Share Posted February 21, 2006 (edited) straight from help #Include <Array.au3> $FileList=_FileListToArray(@DesktopDir) If (Not IsArray($FileList)) and (@Error=1) Then MsgBox (0,"","No Files\Folders Found.") Exit EndIf _ArrayDisplay($FileList,"$FileList") 8) Edited February 21, 2006 by Valuater Link to comment Share on other sites More sharing options...
elite Posted February 21, 2006 Author Share Posted February 21, 2006 straight from help #Include <Array.au3> $FileList=_FileListToArray(@DesktopDir) If (Not IsArray($FileList)) and (@Error=1) Then MsgBox (0,"","No Files\Folders Found.") Exit EndIf _ArrayDisplay($FileList,"$FileList") 8) Point taken Wood for the trees... Thanks for taking the time for a noob Link to comment Share on other sites More sharing options...
randallc Posted February 21, 2006 Share Posted February 21, 2006 Hi, If you need more control and recursing, there are a number of solutions in the thread, link in my signature for "recurse" Best, Randall ExcelCOM... AccessCom.. Word2... FileListToArrayNew...SearchMiner... Regexps...SQL...Explorer...Array2D.. _GUIListView...array problem...APITailRW Link to comment Share on other sites More sharing options...
elite Posted February 21, 2006 Author Share Posted February 21, 2006 Hi,If you need more control and recursing, there are a number of solutions in the thread, link in my signature for "recurse"Best, RandallI'm only need the files one directory deep - but the link is bookmarked and has given me ideas for expansiontnx Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now