I have the following piece of code in a `.py` file:

```py
#!/usr/bin/env python3

import os
import shutil
shutil.rmtree(f"{os.getcwd()}/Logs")
os.makedirs(f"{os.getcwd()}/Logs")

```

and when I convert this to an executable file using `chmod` and run it, it gives me an error saying

> 
> FileNotFoundError: [Errno 2] No such file or directory: '/Users/myname/Logs'
> 
> 
> 

Why is this the case, when the `.py` file works just fine, and how do I fix this?

**Edit:**
I am running this from `/Users/myname/Desktop` not `/Users/myname`

**Edit:**
I apologise this was unclear, I want to delete and remake a folder called `Logs` in my current directory which I am running the file from (my Desktop), but all `os.getcwd()` and `Path.cwd()` gives me is `/Users/myname`, not `/Users/myname/Desktop`