CopyFile not working on computer A but does work on computer B


#1

I am having trouble getting the CopyFile Statement to work when copying a file from my MacMini Server to my local computer. It works fine when copying from a different shared computer and when copying locally. I have traced the problem to the ExecuteUnix ditto command. My computer ignores this command when trying to copy from the server. However using the same file path the FileExists function and the FileInfo function both return correct results. I tried pasting the code directly into Terminal and I get the error ditto: can’t get real path for source. I am really discouraged because I can’t seem to find out why it doesn’t work. I have another computer running the exact same code and accessing the same server and it works perfectly. I have tried re-installing Panorama but that didn’t help. Also I have tried logging into the server with the same credentials as the computer that works but to no avail. Any ideas would be greatly appreciated as I need this to work. Thanks in advance.


#2

Since the terminal gives you the error, it is not an issue of Panorama, but from the system.

You haven’t told us which system is running on your Macs. Older system on computer B, High Sierra on computer A?


#3

Both systems are running 10.6.8 and both systems have been working for years. The Server is running 10.10.5 and running OSX Server 5.0.15. I recently did some disk maintenance using DiskWarrior and perhaps that had an effect.


#4

If all else checks out, Permissions would be very high on my suspect list.


#5

Have you tried dragging the file icon onto Terminal to see what path it writes? Once you have that, you may be able to do it by writing your own ditto, or cp command.


#6

Thanks for the tip. I tried dropping the file onto Terminal and it tells me that the Volume name is “Server-1” but the server is actually named “Server”. When I drop the same file on the other computer that is working it tells me that the Volume is named “Server” which is correct. Any ideas of how I can correct this issue. Thanks.


#7

Follow up. I found the problem online and I am posting the solution in case it might help someone else.

When you eject a drive, the system should remove the mount point for
the drive; however, sometimes this doesn’t happen. Crashes or other
improper ejecting of drives can sometimes cause the system to leave the
drive’s mount point in the hidden /Volumes directory, and then when you
attach the drive again the system recognizes an existing mount point of
the same name and will append a number to the new mount point.

To clear this problem, unmount all drives and go to the hidden
/Volumes directory by entering the text “/Volumes” in the Finder’s Go to
Folder option (available in the Go menu). This should open the mount
points directory, and if you see any folders, aliases, or other files in
the directory that have the same name as your external drive, then
remove them.

It worked perfectly.
Thanks again for all of the help.