football predictionswww.betips.co.ukfootball betting tips

scp: ambiguous target

I was recently trying to copy a simple bash script from one FileMaker server to another using scp. The standard scp command is:

scp file.ext destination_user@server.address:/Folder/file.ext

This would leave you to think that the scp command for copying a script from one FileMaker server to another would look like this:

scp touch.sh user@123.456.7.8:/Library/FileMaker\ Server/Data/Scripts/touch.sh

 

This however fails with the response from terminal being:

scp: ambiguous target

Since the FileMaker Server folder contains a space this causes the failure, despite placing the backslash before the space. The answer is to put quotes around the entire destination to look like this:

scp touch.sh user@123.456.7.8:"/Library/FileMaker\ Server/Data/Scripts/touch.sh"

One comment

  1. Thanks for the post. It helped me with my problem.

Leave a comment