Submit Hint Search The Forums LinksStatsPollsHeadlinesRSS
14,000 hints and counting!

Click here to return to the 'Open a random file in the GUI via a bash script' hint
The following comments are owned by whoever posted them. This site is not responsible for what they say.
Open a random file in the GUI via a bash script
Authored by: periche on Nov 14, '05 08:58:22PM
If the folder will always be the Documents folder in the home directory of the user, you could use:

tell application "Finder"
    open some document file in (path to documents folder from user domain)
end tell

This way it is trasnportable to any mac in any laguage and will always work properly for all users on a system, always using the logged user's Document Folder.

[ Reply to This | # ]