Rsync Wrapper is a simple Objective-C wrapper for the rsync utility which provides AppleScript support and the ability to display a progress bar and transfer statistics.
rsync is an open source utility that provides fast incremental file transfer.
The rsync version that comes with Mac OS X is quite old (2.6.9).
Rsync Wrapper uses the most recent stable version (3.1.0) including the following Mac OS X related patches:
compression.diff
crtimes.diff
fileflags.diff
The AppleScript dictionary contains one command, the source and destination references can be POSIX paths, HFS paths or alias specifiers
The rsync command returns a record
This is a code example, the arguments must be passed as a list of strings, an explicit quotation is not necessary
tell application "Rsync Wrapper"
activate
set {exit code:exitCode, error message:errorMessage, items transferred:filesCopied, statistics:stats} to rsync from source "/path/to/source" to destination "/path/to/destination" arguments {"-au", "--exclude=.DS_Store"}
end tell
if exitCode is not 0 then
display dialog errorMessage
else
display dialog stats
end if
Notes:
¢ To avoid interferences while running rsync the following flags are ignored: -v, --verbose, --progress, --stats, --dry-run.
¢ Any trailing slashes in the source and destination paths are ignored too.
¢ The rsync AppleScript command works synchronously, the next code line is executed after completion.
¢ I haven’t tested a real large file transfer, maybe a timeout block is needed
¨¢ Rsync Wrapper quits automatically after task completion.
The application is code-signed, minimum system requirements: 10.7 Lion
Download: Rsync Wrapper.zip
The software is distributed “as is”, without any warranty nor responsibility for potentially lost data