Your best friend for file transfer.Fetch
Setting Hard Disk and User Names (2 posts)
- Started 10 years ago by tll
- Latest reply 10 years ago from Jim Matthews
I recorded a fetch script in OS X. Part of one statement was
'item alias "MacHD:Users:myname:Desktop:filename"'.
I would like to modify the script so that 'MacHD' and 'myname' are variable so that the script can run on other machines.
What I need to know is how to complete these 2 script statements:
set macHD to ???
set myname to ???
Are there system values that will retrieve the name of the startup disk and the name of the current user?
If I have them then I can use the following statement:
set putto to macHD & ":Users:" & myname & ":Desktop:filename"
and modify my recorded script to
'item alias putto'
so that it will run on any OS X machine.
TIA for any help!
Jim Matthews Administrator
This should help:
set desktopPath to (path to desktop as string)
That will set desktopPath to the path to the current users' Desktop folder.
- Page 1
This topic has been closed.