Suliman:
I am trying to create simple app that would read user input and open file with such name, but every time when I run it's crash with error"std.file.FileException@std\file.d(294): \1.txt"
Try to declutter your code as much as possible, then print the file name before trying to call File, and take a look at what's inside that string. This is not a solution, but it's a start.
Bye, bearophile