borup Posted March 28, 2008 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>
weaponx Posted March 28, 2008 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
borup Posted March 28, 2008 Author Posted March 28, 2008 is there a more simpel way to get filename from file if file.txt exists?
weaponx Posted March 28, 2008 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 ?
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