I’m in the process of writing a script that will copy files to various computer on my nertork using the “SCP” command.
I’ve managed to sort most of it out (with help from this forum) but I’m stuck at copying files with spaces in the name here’s what I’ve got so far:
set the_file to "/Users/me/Desktop/Disc Eraser.app"
set the_Name to "/MediaFiles/Disc Eraser.app"
do shell script ("scp -B -r -p " as Unicode text) & quoted form of the_file & (" install@192.168.38.46:" as Unicode text) & quoted form of the_Name
When I run the scipt it errors with this: “scp: ambiguous target”
if I change the “set the_Name to “/MediaFiles/Disc Eraser.app”” to set the_Name to “/MediaFiles/DiscEraser.app” with no Space between Disc & Eraser the script works.
How do I get the script to accept the space?