Jump to content

Simple? Search harddrive for executable


Recommended Posts

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

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

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

  • Moderators

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.

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

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

  • Moderators

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

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

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
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...