The easiest way to make path strings is to write scripts that create them from the selection in the Finder.
I've been doing this for a couple of decades now and have scripts that create aliases, Relative-aliases, Posix-Paths (quoted or unquoted), $HOME-Based-Posix-Paths (quoted or unquoted).
So I'm only a few keystrokes away from any type of path string I need for scripting.
Appended is my Relative-Alias Constructor Script, which has saved me much work and aggravation over many years.
------------------------------------------------------------------------------
# Auth: Christopher Stone
# dCre: 2012/09/22 00:36
# dMod: 2014/09/23 21:40
# Appl: Finder
# Task: Create relative alias(es) to selected Finder item(s) and copy to the Clipboard.
# : If nothing is selected then the insertion location is used.
# Deps: Uses only OSX components.
# Tags: @Applescript, @Finder, @Alias, @Path, @Reference, @Relative
------------------------------------------------------------------------------
--» PROPERTIES
------------------------------------------------------------------------------
property pathToSpec : {application support, applications folder, desktop, desktop pictures folder, documents folder, downloads folder, favorites folder, Folder Action scripts, fonts, help, home folder, internet plugins, keychain folder, library folder, modem scripts, movies folder, music folder, pictures folder, preferences, printer descriptions, public folder, scripting additions folder, scripts folder, shared documents, shared libraries, sites folder, startup disk, startup items, system folder, system preferences, temporary items, trash, users folder, utilities folder, workflows folder}
------------------------------------------------------------------------------
--» GLOBALS
global expandedPathTo
------------------------------------------------------------------------------
try
set clipboardList to {}
set expandedPathTo to {}
repeat with i in pathToSpec
set end of expandedPathTo to path to (get contents of i) from user domain
end repeat
set AppleScript's text item delimiters to return
set expandedPathTo to paragraphs of (expandedPathTo as text)
tell application "Finder"
set fileList to selection as alias list
if length of fileList = 0 then
set fileList to target of front window as alias as list
end if
end tell
if fileList = {} then error "No items were selected in the Finder!"
set AppleScript's text item delimiters to ":"
repeat with i in fileList
set end of clipboardList to makeRelativeAlias(i)
end repeat
set AppleScript's text item delimiters to return
set the clipboard to (clipboardList as text)
on error e number n
stdErr(e, n, true, true) of me
end try
------------------------------------------------------------------------------
--» HANLDERS
------------------------------------------------------------------------------
on makeRelativeAlias(_item)
global expandedPathTo, pathToSpec
set _item to _item as text
set _len to (length of (text items of _item))
repeat with i from _len to 1 by -1
set _path to ((text items 1 thru i of _item) as text) & ":"
if _path is in expandedPathTo then
repeat with idx from 1 to (length of expandedPathTo)
if (item idx of expandedPathTo) = _path then
set refFldr to "path to " & (item idx of pathToSpec) as text
set diskLocalRef to ("alias " & ("(" & "(" & refFldr & " as text) & ") & "\"" & (text items (i + 1) thru -1 of _item) as text) & "\")"
try
run script diskLocalRef
on error
set refFldr to refFldr & " from user domain"
set diskLocalRef to ("alias " & ("(" & "(" & refFldr & " as text) & ") & "\"" & (text items (i + 1) thru -1 of _item) as text) & "\")"
try
run script diskLocalRef
on error e
error e
end try
end try
return diskLocalRef
end if
end repeat
end if
end repeat
end makeRelativeAlias
------------------------------------------------------------------------------