Jump to content
Macro Express Forums

How to get a user selected folder and folder path into a variable?


Recommended Posts

Hi,

 

As a beginner I might have overlooked something, but so far I have managed to ge ME to work on files in a specific folder by giving the command "Repeat with Folder" a predefined folder path and folder name. This works great!

 

I now wonder if it would be possible to within a macro PROMT the user for a folder (and implicit a folder path) and store this information i a variable to be used with "Repeat with Folder" for example?

 

The ideal thing would be to have some command that says "Get Folder" which presents a dialogue box for the user with a Browse-button and a text that says something like: "Please browse to the Folder which you would like to have processed."

 

The user then clicks the Browse-button and navigates down to any folder, highlights this and clicks OK. The Folder Name and Folder Path is then stored in two variables of choice...

 

Is this possible?

 

Regards,

 

Dag

Link to comment
Share on other sites

To have the macro prompt the user for a folder use the Variable Set String %Folder%: Prompt for a foldername command. To split a file path into separate parts (drive, path, file name, extension) use the Variable Set From File path command. You can then combine the separate parts of the file name using the individual variables.

Link to comment
Share on other sites

To have the macro prompt the user for a folder use the Variable Set String %Folder%: Prompt for a foldername command. To split a file path into separate parts (drive, path, file name, extension) use the Variable Set From File path command. You can then combine the separate parts of the file name using the individual variables.

 

Thank you so much for your kind and quick help!

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
×
×
  • Create New...