Your best friend for file transfer.

Fetch application logoFetch

Setting Hard Disk and User Names (2 posts)

This is an archived topic. The information in it is likely to be out-of-date and no longer applicable to current versions of Fetch.
  • Started 10 years ago by tll
  • Latest reply 10 years ago from Jim Matthews
  • tll Member

    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!

    TomP

    Posted 10 years ago #

  • 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.

    Thanks,

    Jim Matthews
    Fetch Softworks

    Posted 10 years ago #

Topic closed

This topic has been closed.