making mount_afp access a sub directory like Go to... does in 10.4/5

Hello everyone,

I’m in the process of updating a script that I use to allow students and faculty to connect to their shared folder when logging in to a machine locally. In the past, I would have it mount our OD server, get the home directory of the user, then try to mount that directory with the name and password they supplied.

Fast forward to the now and I have them bouncing against our AD server for this information (Ad for authentication, mac server for storage) and then doing the mount_afp command. Problem is, when I do the mount, it goes to the top level share folder and not all the way down to the user’s documents folder.

If I do a Go To → and put in the address, it works:

afp://myserver.org/HomeDirs/2011/10001018/Documents/

Which mounts perfectly to the desktop.

but in my applescript, I have:
mount_afp afp://10001018:password@myserver.org/HomeDirs/2011/10001018/Documents /Volumes/Documents

and it mounts to the HomeDirs folder. Any ideas as to what I’m doing wrong?