Jump to content

Search for a file (I'm a noob)


dakishman
 Share

Recommended Posts

I have searched a little bit and was unsuccessful.

What I am looking for:

1. Using a variable to determine a wild card to look for. (Example: *.docx)

2. The code searches though the computer to find every file ending with *.docx

3. Building an INI list of all the files and their locations (Paths) that can be recalled later. EXAMPLE:

@Scriptdir\List.ini
[*.DOC]
File1 = c:\somefile.docx
File2 = c:\somefolder\someotherfile.dox

[*.BMP]
File1 = C:\Somepic.BMP
File2 = D:\someotherfolder\somefile.BMP

What I have found so far.

1. Filefindfirstfile, and filefindnextfile: I know these will return the names of the files in a given directory, but what if the directory is unknown?

2. I need to use "DriveGetDrive" to specify a list of the drives given (I am mainly interested in the hard drives)

3. I am looking for something with a simple code or in the form of a function

What I am hoping for

I am hoping that someone would be so kind to build the code in the form of a function. Something to the effect where I can call the function with the name of the INI and the name of the file I am searching out. EXAMPLE:

Call ("Search", $sINIFile, $sFilename)
     
Func Search ()
     "Code"
EndFunc

Is this even possible? I know you can search a specific dir for a file, but not sure about searching for a file with an unknown dir.

I am hoping this is a simple task lol... but I have the feeling from what I was reading that it isn't.

I love AutoIT! It doesn't talk back, it doesn't complain that ur on the computer, it loves to be ran over and over and over... but IT STILL DOESN'T DO THE DISHES... Gatta keep da pimp hand strong...

Link to comment
Share on other sites

BTW before I get flamed... I don't have code for this program yet sept the simple GUI. I haven't progressed any farther because if I am not able to search for files, than the project is kind of useless.

I love AutoIT! It doesn't talk back, it doesn't complain that ur on the computer, it loves to be ran over and over and over... but IT STILL DOESN'T DO THE DISHES... Gatta keep da pimp hand strong...

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