Jump to content

Browsing for a File


Hindry
 Share

Recommended Posts

Hi,

I've just started using AutoIt V3 today and have a question.

I need to select a directory that contains files that I need to process. To select the directory I need to browse to it (I cannot type the name in or this would be easy to do). Therefore, I have a window which has "OK" and "Cancel" as options and a typical Explorer type listing. I need to expand a number of folders to find the folder that I want but I cannot work out how to do this.

Once I've worked out how to do this I will need to cycle through several hundered folders (in a loop) processing the files in each. They are numbered sequentially but I don't think that this is going to be of much assistance here. I did think about using the mouse position to clink in the correct place but, to my mind, this will be a little hit and miss and I will need to scroll further down the list to find the folder that I need as I progress through the loop.

Any help would be much apprecaited.

Thanks.

Link to comment
Share on other sites

HI, and welcome..:)

Take a look at the helpfile in the File, Directory and disk management sections.

1: FileSelectFolder.

2: FileFindFirst, FileFindNext

FileFindFirst, FileFindNext are not really fast so you should search for +runwait +comspec + dir in the forum. Something like

runwait(@comspec & "/C dir /S /B >'" & $tempfile & "'")

When it reurns you would need FileRead or FileReadLine to parse $tempfile.

Happy Scripting

Edited by Uten
Link to comment
Share on other sites

Thanks very much for the rapid reply and the welcome.

I've had a look at the section that you mentioned and I don't think it does exactly that I need to do.

I have a window that pops up as a result of a previous piece of scrpiting and I need to drill down to the folder that I want within this window. I've just been trying to navigate using arrow buttons and 'enter' as an alternative. I think that this may work although it is a little cumbersome. If there's an easier method I'd be pleased to hear of it.

Thanks again.

Link to comment
Share on other sites

Thanks very much for the rapid reply and the welcome.

I've had a look at the section that you mentioned and I don't think it does exactly that I need to do.

I have a window that pops up as a result of a previous piece of scrpiting and I need to drill down to the folder that I want within this window. I've just been trying to navigate using arrow buttons and 'enter' as an alternative. I think that this may work although it is a little cumbersome. If there's an easier method I'd be pleased to hear of it.

Thanks again.

Care to provide a sample of that? Other ways I'm all out of suggestions.
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...