Return full unix path

Hi

I need return a full unix path including volume name.
I know that


set x to choose folder

set w to quoted form of the POSIX path of x

returns

tell application "FileMaker Pro Advanced"
	choose folder
		--> alias "Clarks Laptop:Users:JCLAPTOP:Desktop:alex:"
end tell
Result:
"'/Users/JCLAPTOP/Desktop/alex/'"


But I can seem to find a way to return the volume that folder is on.

I understand a can bodge this by concatenating the start up disk and the POSIX path but the folders I am pointing to could well be on different volumes.

Hi,

either use an HFS path (the first path component in the volume)


set x to choose folder
set w to x as text

or get the volume name with System Events


set x to choose folder
tell application "System Events" to set theVolume to volume of x

Thanks Stefan

But I need the script to return a slash path

/HD/users/theuser/thefolder/

or

/HD/theFolder/

I am writing a filemaker database and I have to set up a field to a folder that contains images. This is predetermined at installation and can be on any drive. Filemaker handles paths to images differently to that of files (duh!) and needs the fullpath including the the volume prefixed by imagemac:/HD/theFolder/

POSIX path only returns from /users/blah/ and a HFS path is not readable by Filemaker

Thanks

the initial slash of a POSIX path represents always the startup volume, regardless of its name
External volumes start with /Volumes

If you need a full slash separated path including the volume name use


set x to choose folder
tell application "System Events" to set theVolume to volume of x
set fullPath to "/" & theVolume & POSIX path of x

Thats the concatenation I need Stefan

Many Thanks