dNino Posted July 20, 2007 Share Posted July 20, 2007 how is it possible that the following isn't working correctly?Func idx($dir) $contents=FileFindFirstFile($dir&'\*') While 1 $content=FileFindNextFile($contents) If @error Then ExitLoop $names&=$content&'|' $dirs&=$dir&'|' If FileGetAttrib($dir&'\'&$content)='D' Then If Not StringInStr($dir,'\') Then MsgBox(0,'dir',$dir&'\'&$content) EndIf idx($dir&'\'&$content) EndIf WEnd FileClose($contents) EndFuncthanks to that msgbox() I know that it only searches: - c:\windows on the c drive and - d:\Documents and settings - d:\Windows on the d drive. while I have other directory's on both drives... Link to comment Share on other sites More sharing options...
dNino Posted July 20, 2007 Author Share Posted July 20, 2007 (edited) I don't see an edit-button, maybe because its the first post in a topic... I've tested it on a diverend notebook, wich has windows XP, here it works... I have windows Vista. Someone know a solution? Edited July 20, 2007 by dNino Link to comment Share on other sites More sharing options...
PsaltyDS Posted July 20, 2007 Share Posted July 20, 2007 You didn't say exactly what you are passing into the function call for $dir. Valuater's AutoIt 1-2-3, Class... Is now in Session!For those who want somebody to write the script for them: RentACoder"Any technology distinguishable from magic is insufficiently advanced." -- Geek's corollary to Clarke's law Link to comment Share on other sites More sharing options...
dNino Posted July 20, 2007 Author Share Posted July 20, 2007 (edited) all fixed drives so c: and d: in my case. Edited July 20, 2007 by dNino Link to comment Share on other sites More sharing options...
randallc Posted July 20, 2007 Share Posted July 20, 2007 (edited) Hi, t$dirs&=&dirs&'|'oÝ÷ Û*.æ§jëh×6t$dirs&='|'maybe ?, Randall Edited July 21, 2007 by randallc ExcelCOM... AccessCom.. Word2... FileListToArrayNew...SearchMiner... Regexps...SQL...Explorer...Array2D.. _GUIListView...array problem...APITailRW Link to comment Share on other sites More sharing options...
xcal Posted July 21, 2007 Share Posted July 21, 2007 (edited) "If FileGetAttrib($dir&'\'&$content)='D' Then" is a problem. It should be more like... If StringInStr(FileGetAttrib($dir&'\'&$content), 'D') Then edit - Just to clarify, the reason to do it like that is because, say a directory is also read only and maybe set to archive, then FileGetAttrib will return something like 'RAD.' Edited July 21, 2007 by xcal How To Ask Questions The Smart Way Link to comment Share on other sites More sharing options...
dNino Posted July 21, 2007 Author Share Posted July 21, 2007 "If FileGetAttrib($dir&'\'&$content)='D' Then" is a problem. It should be more like...If StringInStr(FileGetAttrib($dir&'\'&$content), 'D') Thenedit -Just to clarify, the reason to do it like that is because, say a directory is also read only and maybe set to archive, then FileGetAttrib will return something like 'RAD.'Thank you, it's working 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