app to copy files from folder to folder of user without admin rights

Hi All,

I wrote an application in applescript to copy files from a public idisk folder to my harddrive and everything works fine.
Now I want to execute the app on another account with parental control, so with no admin rights. Everything of the application works good only the advise to copy the files doesn’t work(because of no admin rights).
How can I solve the problem?

This is a the critical part of what I wrote:

on copymp3(path_of)
delay 3
tell application “Finder”
set mp3list to every item of folder path_of whose name extension is “mp3”
set anzahl to count mp3list
set var to 1
set counter to 0
if anzahl > 0 then
repeat while var ≤ anzahl
try
move item var of mp3list to folder “Macintosh HD:Users:“username”:desktop:Testordner:”
set counter to counter + 1
end try
set var to var + 1
end repeat
end if
if counter > 0 then
numberofdata(counter as string) of me
else
noupdateinfo() of me
end if
eject path_of
end tell
end copymp3

Hi,

the shell can copy or move files with admin rights by passing username and password


on copymp3(path_of)
	set testOrdner to ((path to desktop as text) & "TestOrdner:")
	delay 3
	tell application "Finder" to set mp3list to every item of folder path_of whose name extension is "mp3"
	set counter to 0
	repeat with anItem in mp3list
		try
			set sourceFile to quoted form of POSIX path of (anItem as alias)
			do shell script "mv " & sourceFile & space & quoted form of POSIX path of testOrdner user name "username" password "¢¢¢¢" with administrator privileges
			set counter to counter + 1
		end try
	end repeat
	if counter > 0 then
		numberofdata(counter as string)
	else
		noupdateinfo()
	end if
	tell application "Finder" to eject path_of
end copymp3

thank you for your fast help.

works very good.