I am working on a script that partially automates backing up contents of an MTP device. Before continuing, I am trying to verify that the relevant folders can be accessed, by adding a line that opens a folder in nemo. This is the script:
#!/bin/bash echo "mtp://[usb:[BUS],[DEVICE]]" echo -n "Enter BUS: " read BUS echo -n "Enter DEVICE: " read DEVICE nemo /run/user/1000/gvfs/mtp:host=%5Busb%3A$BUS%2C$DEVICE%5D/Internal%20shared%20storage/
The first "echo"-line is just for user reference.
$BUS and $DEVICE are correctly substituted with the entered values, resulting in the correct path for the root of the MTP device, but the following folder isn't interpreted correctly, as I get the following error message:
"Could not find "mtp://[usb:002,036]/Internal%2520shared%2520storage". Please check the spelling and try again. [OK]"
Where does the twice added "25" come from and how can I remedy this so the script opens the correct path in nemo?