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
Browse Folder
Moderators: FourthWorld, heatherlaine, Klaus, kevinmiller, robinmiller
Hi Warren,
sounds too funny, but:
will do the trick 
sounds too funny, but:
Code: Select all
...
launch document "your/path/to/folder"
...

You can do lots of things with the command prompt too
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.
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
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.