Thanx. That almost what I need. If I take your Apple-Script I get a path like
But the server path on the NAS should be like. This is the path I see in the info-window of the file.
Here i found a hint for the solution:
This code does that:
#the following line only removes /Volumes/someFolder, it could also add smb://ecc but it would look like a big mess, I think it's easier to add that prefix in a separate line of code
set relativePath to do shell script "echo \"" & thePath & "\" | sed 's/.*Volumes\/someFolder//'"
#now you add the smb prefix or whatever you want
set relativePath to "smb://Server/someParentFolder" & relativePath