Do I need to do something else so bash knows the directory is there?
Thanks.
./test.sh: line : ---------------------------------------------: command not found
cp: cannot stat 'New_Journal.odt': No such file or directory
#!/bin/bash
UbuntuMate_20_04_ReminderFox_Dir="/media/andy/5b4b2ae5-9aaa-4559-9f41-afb313998c75/home/andy/.mozilla/seamonkey/7g4136n1.default/reminderfox/"
Documents_Folder_20_04="/media/andy/5b4b2ae5-9aaa-4559-9f41-afb313998c75/home/andy/Documents/"
---------------------------------------------
cd $DOCS
zip -u -q Ubuntu_Documents.zip *.txt *.doc *.rtf *.html *.png *.pdf *.odt *.ods *.odg *.csv *.xls *.jpg
# Copy New_Journal.odt to the 20.04 installation
cp New_Journal.odt $Documents_Folder_20_04
Bash is looking for the 'New_Journal.odt' file in '/media/andy' and can not find it.
I persume you have 'New_Journal.odt' in "$DOCS", but you never told bash what "$DOCS" is.
So the command 'cd' gets executed with an empty argument (i.e. $DOCS), and it changes therefore to '/media/andy'
b.t.w. It is a good habit to always surround your variables with doublequotes (except in very very special cases) so that it is not susceptible to wordsplitting (like with filenames with spaces) and code injection. (see xkcd: Exploits of a Mom)
Also, if you want to get rid of 'command not found' , start the '- - - - - -' line with a '#'