Always generate new file if not selected otherwise

When starting to write [[filename]] it scans for links to filename which is how I need it. When I finish typing it and file filename does not exist, it creates a new file which is also as I need. I would like to keep this behaviour even when filename exists in a different folder.
Example:

folderOne
>> fileOne
folderTwo
>> fileTwo

I now type [[filename]] in fileOne which will create filename in folderOne when clicking on it.

folderOne
>> fileOne
>> filename
folderTwo
>> fileTwo

I now type [[filename]] in fileTwo but that now always links to filename in folderOne even if I dismiss the popup where I could have selected the file in folderOne. How can I keep the behaviour that it does not link automatically if not selected so but insterad will create a new file on click?

You are working slightly against Obsidian, attempting to create files with the same name in different folders. Obsidian essentially does not care about folders. It can, and is designed, to work without. This has the benefit of freeing the note-taker from having to think where to file notes. However, if folders are an extra help for you to retrieve notes, you can use them. However, it is preferred to keep file names unique.

Obsidian identifies files by their file name only, and will find them wherever they live in the vault. It has a “disambiguation” mechanism, where it will add a path if files in different folders do have the same name. If you want to go this route, you will need to always provide the path along with the file name, to make clear to Obsidian which of the similarly named files you want to refer to. Obsidian does not have the concept of a “current folder”. All notes in the vault remain within reach at any time.

So either add paths each time, or, better, adapt your workflow to work with unique file names.

You’re probably right, it has indeed it’s reason to be like that. I was looking for a fast way to create a note right away and “fixed” it by using the Make.md plugin which is essentially what I was looking for. I could have used a slightly different name, e.g. with a prefix, but now it’s good as is. Thanks alot!