borup Posted March 28, 2008 Share Posted March 28, 2008 can i make this to search subfolders also (like /s on dir f.ex) <autoit> $dir = 'c:\TEST' FileChangeDir($Dir) While 1 $search = FileFindFirstFile("*.txt") $file = FileFindNextFile($search) If NOT @error Then MsgBox(4096, "File:", $file) Exit Else Sleep("1000") EndIf WEnd ; Close the search handle FileClose($search) </autoit> Link to comment Share on other sites More sharing options...
weaponx Posted March 28, 2008 Share Posted March 28, 2008 You have to use some form of recursion, there are a lot of FileListToArray() functions that do this for you:http://www.autoitscript.com/forum/index.ph...filelisttoarray Link to comment Share on other sites More sharing options...
borup Posted March 28, 2008 Author Share Posted March 28, 2008 is there a more simpel way to get filename from file if file.txt exists? Link to comment Share on other sites More sharing options...
weaponx Posted March 28, 2008 Share Posted March 28, 2008 is there a more simpel way to get filename from file if file.txt exists?Why would you want to get the filename if that is what you already have ? 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