I want to use the zenity text input for file selection so i can just drag and drop. Seems like it should work but doesn't. When I drag in a file it doesn't find it, but the path and file name seem correct.
The "cut" is to remove the leading "file:/" from the input text.
xinput=$(zenity --entry \
--title="Drag in file" \
--text="" \
--entry-text "" \ )
xfile=$(echo "$xinput" | cut -c 7-)
if test -f "$xfile"; then
echo "Found!"
else
echo "Not Found!"
fi
echo $xfile