Howdy All,
I need some help with an AppleScript application that I am working on (see below). It basically mounts a network drive and then backs up my photos to the network drive. A little background: I have a network attached storage device that only operates with SMB/CIFS at 192.168.0.198 with a share called BACKUP and my pictures are all in the default OSX Pictures folder.
The first part of my script works, that is that it will mount the network drive if it is not already mounted. Unfortunately the backup part doesn't work. I recently switched from PC to Mac so I am still learning how unix specifies drive locations and how the unix applications work. I think that rsync should be the correct thing to use but I am apparent doing something wrong because nothing happens . Also for some reason, when I compile the script a bunch of spaces get added to the directory string.
Thanks for the help.
Eric
I need some help with an AppleScript application that I am working on (see below). It basically mounts a network drive and then backs up my photos to the network drive. A little background: I have a network attached storage device that only operates with SMB/CIFS at 192.168.0.198 with a share called BACKUP and my pictures are all in the default OSX Pictures folder.
The first part of my script works, that is that it will mount the network drive if it is not already mounted. Unfortunately the backup part doesn't work. I recently switched from PC to Mac so I am still learning how unix specifies drive locations and how the unix applications work. I think that rsync should be the correct thing to use but I am apparent doing something wrong because nothing happens . Also for some reason, when I compile the script a bunch of spaces get added to the directory string.
Thanks for the help.
Eric
Code:
tell application "Finder"
if not (exists disk "BACKUP") then
mount volume "cifs://WORKGROUP;SARIC@192.168.0.198/BACKUP"
delay 3
end if
if exists disk "BACKUP" then
try
do shell script "rsync -vaE --delete " / Users / Saric / pictures / " " / Volumes / Backup / pictures / ""
end try
else
try
display dialog "Error mounting BACKUP."
end try
end if
end tell