I have tried with a simple command:
cd Name of the Folder
but it's not working, of course.
I have also been searching on the web, but the methods I found are not actually working.
How can I accomplish this?
The answers in the linked article are correct (but maybe hard to find among all the other information there). Key problem is that
bash (and any other shell) use whitespace to separate between words, so any space characters within names (and any situations where such characters might occur) need to be protected/escaped.
cd "folder with whitespace in name" cd folder\ with\ whitespace\ in\ name
and (if you have the name of the folder in a variable)
FOLDER_NAME="folder with whitespace in name" cd "$FOLDER_NAME"
To access files or directories that have spaces in them you have to tell Bash to ignore them (it uses spaces to delimit commands so it has to be told that the space in the file name is actually part of the filename)
to do that you need to put a backslash () in front of the space.
cd Name\ of\ the\ folder
However bash will help if you press the TAB key after the start of the filename i will autocomplete and take of the spaces for you
cd Name TAB and it will autocomplete.