How to assign File/Folder path to a Variable in Terminal
You have to use quotes if the path contains space characters:
FILE_NAME="/home/$USER/Downloads/My Folder"
The issue is the embedded blank in the name. The simplest way to resolve this issue is to enclose the full path string with quotes (i.e. FILE_NAME="/home/${USER}/Downloads/My Folder"
The reason to use "
in your case is because of your use of $USER which requires a substitution, with '
this would not occur.
A secondary question is how are you going to use the variable. In your example... I would assume that you dropped the cd from the command however ... to use the variable ... you should probably also use " around its use
so ... my guess at your use ... cd "$FILE_NAME"