View Full Version : finding the desktop path on win / mac os
deadalvs 01-09-2008, 06:09 PM hello !
i am searching a maya command that stores finds the desktop path either on macs or on pcs...
i checked the docs, but could not find the *quick answer* ...
thanks for any input.
|
|
GiantG
01-10-2008, 08:22 AM
Small not perfect Workaround...
// Windows
string $DesktopPath = `getenv "HOMEPATH"` + "/Desktop";
Don't have MacOS to test it there
Chadrik
01-10-2008, 03:47 PM
i think HOMEPATH might be a windows specific env, bc it doesn't return anything on osx. however, on osx and linux you can use ~ as a shortcut for the home directory. for example:
system( "ls ~/Desktop/")
-cahd
deadalvs
01-13-2008, 05:57 PM
thanks so far, guys !
for macs:
global string $desktopPath;
$homeString =`getenv "HOME"`;
$desktopPath = ($homeString + "/Desktop/");
CGTalk Moderation
01-13-2008, 05:57 PM
This thread has been automatically closed as it remained inactive for 12 months. If you wish to continue the discussion, please create a new thread in the appropriate forum.
vBulletin v3.0.5, Copyright ©2000-2013, Jelsoft Enterprises Ltd.