Copy file to root of startup disk?

I’m trying to copy a file to root of the Boot drive

do shell script "sudo cp -R " & quoted form of "path/to/file/item.jpg") & space & "/" with administrator privileges

This however simpy copies the file to the same directory.

Any way to get startup disk root without the user telling the name of it?

Hi,

some notes:

administrator privileges is a synonym for sudo, it’s strongly discouraged from using both.
If you’re going to copy only a file, the -R switch is not needed
This syntax should do it


do shell script "cp " & quoted form of "path/to/file/item.jpg" & space & quoted form of "/item.jpg" with administrator privileges