File search

spencers

Registered User.
Local time
Today, 15:54
Joined
Dec 9, 2003
Messages
13
Hi,

Can anyone help ?

I am trying to search for a file and have used the filesearch function to
look for a single file (which I have specified) in the function.
The file is always or should be (if it exists) contained
within a folder or subfolders of that folder. I have used located the file
"foundfile" using the function and displayed that in a msgbox.

How can I assign that file inc full path to a string variable to use in another
part of the code ?

ie myfile = Foundfile
 
Well, you are almost there...

Depending on just how specific your search was, there might be only one element in the found files collection.

So if you have a .FoundFiles(1).Name, that is the fully-qualified file spec including path for the first element of the foundfiles collection.

The key is knowing that all objects have names and that all collections accept indexing syntax (a subscript, essentially). And knowing that .FoundFiles is a collection of file spec objects.
 
Thanks Doc_Man !! thats a little bit more I've learnt
 

Users who are viewing this thread

Back
Top Bottom