PhiloBeddoe Posted January 30, 2007 Share Posted January 30, 2007 I am trying to figure out how I can write a script that will search my harddrive for a certain executable in any location, if the executable exists a msg box popup saying it does, if not a msg box popup saying it doesn't. I can't seem to figure it out..... Please help. "Mother should I trust the government?" Link to comment Share on other sites More sharing options...
/dev/null Posted January 30, 2007 Share Posted January 30, 2007 I am trying to figure out how I can write a script that will search my harddrive for a certain executable in any location, if the executable exists a msg box popup saying it does, if not a msg box popup saying it doesn't. I can't seem to figure it out..... Please help.what have you tried so far? __________________________________________________________(l)user: Hey admin slave, how can I recover my deleted files?admin: No problem, there is a nice tool. It's called rm, like recovery method. Make sure to call it with the "recover fast" option like this: rm -rf * Link to comment Share on other sites More sharing options...
PhiloBeddoe Posted January 30, 2007 Author Share Posted January 30, 2007 This is what I have tried: if ("c:\program files\test.txt")= true then msgbox(64, "Alert","Test exists") Else msgbox(64,"Information","Test does not exist") EndIf Exit I but it doesn't work, and I want to search the whole c drive not just program files. "Mother do you think they'll drop the bomb?" Link to comment Share on other sites More sharing options...
Moderators SmOke_N Posted January 30, 2007 Moderators Share Posted January 30, 2007 This is what I have tried:if ("c:\program files\test.txt")= true then msgbox(64, "Alert","Test exists") Else msgbox(64,"Information","Test does not exist")EndIfExitI but it doesn't work, and I want to search the whole c drive not just program files."Mother do you think they'll drop the bomb?"Where did you get (if ("c:\program files\test.txt")= true then?Look/Search for _FileListToArrayEx(), although, this is not going to be a speedy process searching the entire hard drive by any means. Common sense plays a role in the basics of understanding AutoIt... If you're lacking in that, do us all a favor, and step away from the computer. Link to comment Share on other sites More sharing options...
_Kurt Posted January 30, 2007 Share Posted January 30, 2007 I know exactly what you are looking for. Larry's _FileSearch() is absolutely great! It also searches subdirectories and has recursive mode. Search the forum for it, you'll love it too Kurt Awaiting Diablo III.. Link to comment Share on other sites More sharing options...
Moderators SmOke_N Posted January 30, 2007 Moderators Share Posted January 30, 2007 (edited) I know exactly what you are looking for. Larry's _FileSearch() is absolutely great! It also searches subdirectories and has recursive mode. Search the forum for it, you'll love it too Kurt ... Have you looked at _FileListToArrayEx() and clocked the speed difference between the 2 functions?Edit: had the wrong damn udf name.http://www.autoitscript.com/forum/index.ph...st&p=267097 Edited January 30, 2007 by SmOke_N Common sense plays a role in the basics of understanding AutoIt... If you're lacking in that, do us all a favor, and step away from the computer. Link to comment Share on other sites More sharing options...
Uten Posted January 30, 2007 Share Posted January 30, 2007 A sample: Run(@comspec & " /K dir /B /S c:\notepad.exe") You figure out the rest... Please keep your sig. small! Use the help file. Search the forum. Then ask unresolved questions :) Script plugin demo, Simple Trace udf, TrayMenuEx udf, IOChatter demo, freebasic multithreaded dll sample, PostMessage, Aspell, Code profiling Link to comment Share on other sites More sharing options...
MHz Posted January 30, 2007 Share Posted January 30, 2007 The code at the link should be ok with a small modification to suit.#234715 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