Jump to content

Recommended Posts

Posted (edited)

How to select a folder and assign the path value to a variable in autoit?

 

; Selecting a file and assigning that to $sPath value)
Case $file
            $sPath = FileOpenDialog("Open a file", @desktopdir, "Cabinet Files (*.cab)",$FD_MULTISELECT)
            GUICtrlSetData($file, $sPath)

; How to do the same with a folder?
      Case $folder
         $sPath = FileSelectFolder($sPath, "")

Need the selected folder path to be used in the $sPath section for further implementation.
Or a method to Select Folder or Files at once.

Edited by Shadow_Delta
Posted

How about function FileSelectFolder?

My UDFs and Tutorials:

  Reveal hidden contents

 

  • Moderators
Posted

Shadow_Delta,

  Quote

Or a method to Select Folder or Files at once

Take a look at my ChooseFileFolder UDF (the link is in my sig) which allows you to select both files and folders at the same time in a single dialog.

M23 

Public_Domain.png.2d871819fcb9957cf44f4514551a2935.png Any of my own code posted anywhere on the forum is available for use by others without any restriction of any kind

Open spoiler to see my UDFs:

  Reveal hidden contents

 

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
×
×
  • Create New...