Access to application support folder

I´m getting desperate about a simple script, an maybe (well i´m pretty sure) have a very obvious solution that i´m not seeing… i have this script

do shell script "echo $USER" -- Gets username
set userName to result
--set folderName to "Application\ Support"
do shell script "ditto  '/Users/Shared/Agenda/' /Users/" & userName & "/Library/" & folderName & "/AddressBook/" --"/Library/Application Support/AddressBook/"

basically i´m trying to copy the content of Agenda folder (is a copy of the AddressBook content of another user) to the current user´s AddressBook folder but i get an error window:

ditto: /Users/abejerano/Library/Application: No such file or directory

I don´t know how to get the script to recognize the path correctly…

The funny thing is that when i use this script:

do shell script "echo $USER" -- Gets username
set userName to result
do shell script "ditto '/Users/" & userName & "/Library/Application Support/AddressBook/' /Users/Shared/Agenda"


in your first script two backslashes are needed to escape the space character

set folderName to "Application\\ Support"

or you quote the whole path as in the second script.

Alternatively you can use the path to . folder shortcut

do shell script "ditto /Users/Shared/Agenda/ " & quoted form of (POSIX path of (path to application support folder from user domain) & "AddressBook") 


As I guessed… very simple solution… many thanks for the help and the tip …