How to run a file in a folder using the terminal?

I used this commands:
$python3 main.py
$python3 HTML Code/main.py
both aren’t working
The file: main.py is in the folder HTML Code

Hiya @Tigitaal, welcome to the community!

I think you’re having a problem because of the space in your file name.

Just to make it easier, try changing directory into the ‘HTML Code’ folder first like this:

cd 'HTML Code'

(If you start typing html and press the tab key, it should autocomplete to ‘HTML Code’)

Once you’re in there, try again with:

python3 main.py

Hope it helps, let us know :slight_smile:

3 Likes

It worked, thanks!

1 Like