I got this to work, on Debian Gnu/Linux:
/bin/echo "Drag folder into Terminal and hit return ->"
eval "cp -R -t '/home/my/Desktop' $folderLocation"
I dropped the path to read (you may not have to (read is a built in of bash, and can't find it in
Important changes are in last line:
- -t option followed by target directory makes cp more robust.
- eval is needed because of quotes put around return value by read.
As for why you get '' (empty string from read). I am guessing it is because the drag and drop is not working, this is not a feature of the shell but of the terminal and file manager. What terminal program are you using?