Need help to copy a file to a specific directory using a bash script command

I am currently running UM 15 on one of my machines. Previously UM 14. I have a Canon LBP laser printer that has always been a bit flaky to run on Linux. but I have always managed to get it to run up to Ubuntu 14. On Ubuntu 15, however, this has proved impossible. To work around the problem, I have installed an UM 14 VM inside Virtual-box and have done any printing to my Canon from there via a shared folder with the host UM 15 machine.

In order to automate/make more efficient this process, I have begun to write a right-click bash script that I can use on any selected file that will send a copy of it to my VM shared folder and then will open the UM 14 VM with the shared folder open on the desktop ready for me to print it. However, I have hit a problem with the first part of the above procedure.

If I use the following command in my bash script to copy the file, it works only if I am copyingfrom any selected file anywhere inside my main system drive (sda1) to anywhere else in my home folder:

cp $1 /home/stephen/vm-printdocs

However, if I use the same command to copy a currently selected file from an external drive (sdb1) to anywhere in my home folder it does not work.

Because I am using this as a right-click context-menu script, I can’t see its output to see what is going wrong. If anyone could tell what is wrong with the command or how I can view its output while it is running so I can work out for my self what is going wrong, I would be grateful.

Please don’t direct me to a typical nautilus-type bash script that allow one to copy a file to another location by choosing the destination directory during the coping procedure. I do not want or need that. I just need the file to go to the one, single, pre-specified directory. In this case, one I have called vm-printdocs (the one I am sharing between my Ubuntu 15 host and my Ubuntu 14 VM guest), which is in my home folder. In other words, I just need a simple, one-click command and the file will be copied to the pre-specified directory. To reiterate, though, this command does actually work for copying from anywhere in my main sda1 drive to anywhere else in that drive. The problem arises only when I try and copy from a second drive (sdb1) to my main drive (sda1). My issue with this is that I have most of my personal files stored on my sdb1 drive.

Okay, found a fix. Don’t know why it is a fix, but it is:

I have relocated my vm printdocs shared folder on to my sdb1 drive. Now, if I try and copy a file form anywhere in my sdb drive to this shared folder, it works. However, it also works if I try and copy any file form my sda drive to this folder. Someone might be able to explain why it works in one direction (from sda to sdb) but not the other way around. No matter though, I got it working