Using rsync to copy files to destination drive - help please!

Hi,

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?

Thanks

What about

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

Hope it works,
ief2

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

ief,

Many thanks for the help, I tried using the script you suggested, but repeatedly get an error:

SefanK

Your script worked perfectly.
Is there some kind of progress bar I could embed into this script to show the script is working?

Thanks to you both for your time & help!