Page 1 of 1
Browse Folder
Posted: Tue Oct 07, 2008 3:11 pm
by warrenk
I have a application that creates a folder. Once the folder is created, I want to automatically open the folder (same way as if you double click a folder in windows) for the user to view. What would be the easiest way to do this?
Thanks!
Warren
Posted: Tue Oct 07, 2008 3:18 pm
by Klaus
Hi Warren,
sounds too funny, but:
Code: Select all
...
launch document "your/path/to/folder"
...
will do the trick

Posted: Tue Oct 07, 2008 3:45 pm
by warrenk
Klaus,
Thanks...that worked great!
Warren
Posted: Tue Oct 07, 2008 3:45 pm
by SparkOut
You can do lots of things with the command prompt too
Code: Select all
replace "/" with "\" in tFolderPath
-- Windows will need its native path delimiters
set the hideConsoleWindows to true
-- will prevent a black command prompt window being visible
get shell ("explorer.exe /n," && tFolderPath)
-- will achieve the same result
You can experiment with /n which will give a "normal"
My Computer style window, or /e which will give a "File list"
Windows Explorer style window.
The "launch" way is easier and simpler to achieve your result, but you can see how the "get shell" structure can be used to have more control of the command prompt options.
You can also make a vbscript function and "do" && scriptTerm as "vbscript" which may be useful for you to look up.