I’ve been attempting to understand the logic behind the rsync command (noobie - sorry!)
This is where I’m at, and I can’t seem to find any suitable answers despite searching through these posts:
set src to "500MB USB" as alias
set dest to POSIX path of (choose folder with prompt "Choose the destination directory" default location (path to desktop))
do shell script "rsync -blah " & quoted form of src & space & quoted form of dest
I’m getting an error message which I kind of understand (to do with POSIX commands - not quite at that stage yet), but have no idea how to rectify:
I’d appreciate it if someone could guide me as to where I’m going wrong?
set src to "500MB USB" as alias
set dest to POSIX path of (choose folder with prompt "Choose the destination directory" default location (path to desktop))
do shell script "rsync -blah " & quoted form of (src as text) & space & quoted form of dest
This is a coercion error: An alias cannot be quoted, it must be coerced to text
try this
try
set src to POSIX path of ("500MB USB:" as alias)
set dest to POSIX path of (choose folder with prompt "Choose the destination directory" default location (path to desktop))
do shell script "rsync -blah " & quoted form of src & space & quoted form of dest
end try
The try block avoids an error if the volume is not available