How to copy folder from AFP share to other AFP share

Hello,

I had a script where I could copy folders from a LaCie disk to my iMac (OSX10.5.6).

Now I’d like to copy folders from a little LaCie NAS (which is a share) to another share. So I adjusted the script … like this:


mount volume "afp://RNWBackup:backup@172.16.1.253/_macnetwork" (* SOURCE *)
mount volume "afp://RNWBackup:backup@172.16.1.253/lacie_nas2" (* DESTINATION *)


set sourceBaseFolder to "LaCie_NAS:_macnetwork:"
set destinationBaseFolder to "LaCie_NAS:lacie_nas2:"


tell application "Finder"
	activate
	set allProjectFolders to name of folders of folder sourceBaseFolder
	set projectFolder to choose from list allProjectFolders with prompt "Selecteer project folder"
end tell

if projectFolder is false then return

set sourceFolder to quoted form of (POSIX path of sourceBaseFolder & item 1 of projectFolder)
set destinationFolder to quoted form of POSIX path of destinationBaseFolder

tell application "Finder" to try
	do shell script "/bin/mkdir -p " & destinationFolder & ";/usr/bin/rsync -atE --delete " & sourceFolder & space & destinationFolder
	display dialog "Backup ready" buttons {"OK"} default button 1
on error e
	display dialog "Error " & e & " found" buttons {"OK"} default button 1
end try


The script log shows:

tell current application
mount volume “afp://RNWBackup:backup@172.16.1.253/_macnetwork”
file “_macnetwork:”
mount volume “afp://RNWBackup:backup@172.16.1.253/lacie_nas2”
file “lacie_nas2:”
end tell
tell application “Finder”
get name of every folder of folder “LaCie_NAS:_macnetwork:”
activate
get name of every folder of folder “LaCie_NAS:_macnetwork:”
“Finder got an error: Can’t get folder "LaCie_NAS:_macnetwork:".”

What am I doing wrong?

Thanks in advance for your time and attention.

Hi,

I guess, the name of the mounted disks are _macnetwork and lacie_nas2.
You can check this in the folder /Volumes

So use


.
set sourceBaseFolder to "_macnetwork:"
set destinationBaseFolder to "lacie_nas2:"
.

no no no NO … it can’t be THAT simple. :mad:

My Finder preference did’nt hav ‘Computer’ activated, so I did’nt see that I had not needed to place anything in front of my sharenames…

thank’s Stefan.:smiley: