title: How to copy using scp on shell script to folders space named?
body: <p>Hey guys I am working on this app that connects to Raspberry Pi through SSH. I use NSTask and NSPipe and shell scripts to execute the shell commands through the Mac app GUI.</p>
  
  <p>The problem is that when I want to copy using "scp" command I get "No such file or directory" error with folders with spaces on its name. If the path is "/Users/home/Desktop/New Files/" doesn't work, but if "/Users/home/Desktop/New Files/" works fine.</p>
  
  <p>The app must be able to use both, separated named folders and not separated, but I just don't know how to do it. </p>
  
  <p>Here is my shell script command:</p>
  
  <pre><code>#!/bin/bash
  /usr/bin/ssh pi@192.168.25.144 \
  /usr/bin/scp /home/pi/"${1}" home@192.X.X.X:/Users/home/Documents/New Files/
  </code></pre>
  
  <p>The "X"on the ip was intentionally removed and it's not on the real code.</p>
  
  <p>So, anyone could help????</p>