Browse to and Select Folder

Hints, tips and tricks for newbies

Moderators: Dorian (MJT support), JRL

Post Reply
ueberyak
Junior Coder
Posts: 31
Joined: Tue Sep 03, 2013 9:45 pm

Browse to and Select Folder

Post by ueberyak » Wed Apr 16, 2014 7:18 pm

I have a script which is successfully using GetFileList to return all folder names from a hardcoded location but I want the user to be able to Browse to any folder they like. I tried Input and I tried created a dialog but I didn't get either to return the desired effect.

Below is the hardcoded version.

Code: Select all

let>GFL_TYPE=1
GetFileList>\\Directory\Folder\*.*,files,;

Separate>files,;,file_names

Let>k=0
Repeat>k
  Let>k=k+1
  WriteLn>C:\FileListTest\Test.txt,,file_names_%k%
Until>k,file_names_count

mdl>Job complete.
I know how to handle the variable, I just need to know how to get it.
Thanks,
Josh

ueberyak
Junior Coder
Posts: 31
Joined: Tue Sep 03, 2013 9:45 pm

Post by ueberyak » Wed Apr 16, 2014 7:54 pm

Ugh. Never mind.

Let>INPUT_BROWSE=2
Input>

This did the trick.
Thanks,
Josh

User avatar
Marcus Tettmar
Site Admin
Posts: 7395
Joined: Thu Sep 19, 2002 3:00 pm
Location: Dorset, UK
Contact:

Post by Marcus Tettmar » Thu Apr 17, 2014 7:49 am

You could also do it with a custom dialog, if you wanted more features or to make it prettier, but if you just want a quick way to browse for a folder your method is the simplest.
Marcus Tettmar
http://mjtnet.com/blog/ | http://twitter.com/marcustettmar

Did you know we are now offering affordable monthly subscriptions for Macro Scheduler Standard?

Post Reply
Sign up to our newsletter for free automation tips, tricks & discounts