Sign in to follow this  
Followers 0
PhiloBeddoe

Simple? Search harddrive for executable

8 posts in this topic

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?"

Share this post


Link to post
Share on other sites



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 *

Share this post


Link to post
Share on other sites

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?"

Share this post


Link to post
Share on other sites

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?"

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.


[center]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.[/center]

Share this post


Link to post
Share on other sites

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..

Share this post


Link to post
Share on other sites

#6 ·  Posted (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 :D

Kurt

:D ... 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 by SmOke_N

[center]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.[/center]

Share this post


Link to post
Share on other sites

The code at the link should be ok with a small modification to suit.

#234715

:)

Share this post


Link to post
Share on other sites

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 account

Sign in

Already have an account? Sign in here.


Sign In Now
Sign in to follow this  
Followers 0