JoeCool Posted July 12, 2005 Share Posted July 12, 2005 (edited) I was in need for a "file and recursive folder processor " so I tought :Hey Im gonna build one ! So there's 4 files :http://pages.videotron.com/n45w73/iinformatique.htmlws.au3 --- the starting script, calling the main script doScriptFolderFilesdoScriptFolderFiles.au3 --- the superdoper processor -ortf --- option for recursive top first (top down)-orbf --- recursive bottom first ---- no param no recursion-sscript ---- the called script for each file ( here doOneFile.au3 )-ppath ---- path of the folder to process ;-)-aarg ---- argument to pass to file processor script.doOneFile.au3 --- the script called (in this case) for each filevector.au3 --- some useful vector definition-----------------------How to try it .... Put all files into your "MyDocuments"Run ws.au3ws will start doScriptFolderFiles with option to call doOneFile.au3 into MyDocuments.doOneFile simply append the current folder name and file name whom it's currently processing into a file dir.txt place into MyDocuments.beware if you have a big MyDocument s folder with full of stuff, it will create a big dir.txt file.And of course that processor is NOT fast ....So processing your C: drive can take a long long time .... Hey that thing is for fun and simple stuff , feel free to trash it and build a better one but keep me inform Edited July 12, 2005 by JoeCool Link to comment Share on other sites More sharing options...
blindwig Posted July 12, 2005 Share Posted July 12, 2005 If you're looking for a lot of files, it's nice to give the user a progress bar. Use the Progress*() functions, or write your own like my UDF:http://www.autoitscript.com/forum/index.php?showtopic=13301See also my _FindAllFilesR() function:http://www.autoitscript.com/forum/index.php?showtopic=12835The first function it calls, _FileGetTreeList() returns an array of the names of all directories under the given path, so you can use it like this:PseudoCode: $aFolderList=_FileGetTreeList() loop thorugh $aFolderList Process each item of $aFolderList My UDF Threads:Pseudo-Hash: Binary Trees, Flat TablesFiles: Filter by Attribute, Tree List, Recursive Find, Recursive Folders Size, exported to XMLArrays: Nested, Pull Common Elements, Display 2dSystem: Expand Environment Strings, List Drives, List USB DrivesMisc: Multi-Layer Progress Bars, Binary FlagsStrings: Find Char(s) in String, Find String in SetOther UDF Threads I Participated:Base64 Conversions 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