New to Applescript - Trying to Copy Files

I’m trying to do a simple script where I take iTunes information, then copy that to a text file on a mounted volume on my workstation, that mounted volume is actually on my webserver, then I have a php script which will read that.

The problem is, for some reason I can’t get AppleScript to write to the folder where my HTML files are, but it will write to other server volumes. So I think the easiest way to do this is to have a script which copies the files on my webserver. Not sure how to do that.

I will post what I have here

iTunes to Text Script

repeat
	try
		with timeout of 360 seconds
			tell application "iTunes"
				
				if player state = stopped then
					
					set status_string to "(stopped)"
					
				else
					set current_name to name of current track
					set current_album to album of current track
					set current_artist to artist of current track
					set current_duration to duration of current track
					set remaining to current_duration - player position
					set remaining_m to remaining div 60
					set remaining_s to remaining mod 60
					
					if remaining_s < 10 then
						set padding to "0"
					else
						set padding to ""
					end if
					
					-- U.S. English quotes
					set status_string to "Name: " & current_name & "
"
					set status_string to status_string & "Artist: " & current_artist & "
"
					set status_string to status_string & "Album: " & current_album & "
"
					set status_string to status_string & "Remaining: " & remaining_m & ":" & padding & remaining_s
					
				end if
				--you need to change the path in this next line of code to be the same as the directory of the php file that i gave you.
				do shell script "echo " & quoted form of status_string & " > /Volumes/Gecko/itunes_status.txt"
				
			end tell
			
		end timeout
		
		delay 10
		
	on error errMsg number errNum
		
		say "error"
		--display dialog errMsg
		delay 60
		
	end try
end repeat

The Gecko volume is a volume on my web server which Apple Script will write to, it won’t write to where the HTML is, because that would be too easy.

Model: G5 Workstation, XServer 10.3 Server
AppleScript: AppleScript 1.10.3
Browser: Safari 417.8
Operating System: Mac OS X (10.4)