Running a custom application stored in the Application folder

I am trying to run the COPYtoUSB1 customised application located under the Mac mini server Application folder.

When running the script it does not find the program under the application folder.

Would someone have an idea why? This always worked before.

I replaced “CopytoUSB1” by “Notes” which is located under the Application folder and it did work.

When I saved the script I saved it as an Application. If I double click on it under the application folder it does work correctly.

Does it make a difference that I’ve loaded the

Thanks!
Daniel

program

tell me
	activate
	set S to "CopytoUSB1" as string
	do shell script "open -a \"" & S & "\""
end tell