Help w script for copying files from CD to different computers

property destinationFolder : {path to home folder as text, "desktop:Work Files"} as string
property newFolder : {path to home folder as text, "desktop:"} as string

tell application "Finder"
	make new folder at alias {newFolder} with properties {name:"Work Files"}
	set remoteDisk to disk "Work Content"
	duplicate (every file of remoteDisk) to folder (destinationFolder)
	duplicate (every folder of remoteDisk) to folder (destinationFolder)
	open {path to home folder as text, "desktop:Work Files:addToLib2"} as string
end tell

I am fairly new to applescripting and I am working on a small script that will copy files from a CD I am making to different computers then sync that content to iTunes using an existing applescript that I found on-line.

When I save the code out as an application…it works perfectly on my home computer (except for the last line of code to open up the “addToLib2” script) When I take it to another mac it shows that the path to the desktop is the same as my home computer and will not run the file. However, when I open the file in script editor and run the script it works perfectly.

Question 1:
What is causing the script to do this and how should I go about fixing this.

Question 2:
I haven’t gotten the

open {path to home folder as text, "desktop:Work Files:addToLib2"} as string

to work. I am sure this is a miscoding. I am basically copying the file over from the CD to the same folder (Work Files) and running it at the end of the code to sync up music and videos to iTunes. What would the correct coding be?

Thank you for your time everyone.

Model: 1.8 GHz PowerPC G5
Browser: Safari 525.27.1
Operating System: Mac OS X (10.4)

I’m not sure why you’re having the problem, but here are a couple of things that might help.

  1. Don’t use “as string” since that has been deprecated. Use “as text”, which you’ve got half the time anyway!

  2. Use “path to desktop folder” instead of the home folder, but as an alias:

open {path to desktop folder as text, ":Work Files:addToLib2"} as alias

I’d probably do it this way:

set mypath to ((path to desktop folder as text)&":Work Files:addToLib2") as alias
open mypath