File location

Good day
How can I make it so that when opening a file the last path is there and it doesn't go to a default location?

Thank you