I have a textbox where I put the name of a file that contains the forward-slash character '/'
When I grab the text from the textbox the '/' is automatically replaced with '\' and it obviously can't find the file, for example:
I write C:\Users\Temp\my/file.txt I get C:\Users\Temp\my\file.txt
So, instead of opening "my/file.txt", it searches for a directory "my" which contains "file.txt"
How can I solve this?

my/file.txta valid filename? (I.e. where the/isn't a directory specifier.)/is invalid in NTFS file names. It's a directory specifier on Unix, Linux, MacOS. Where did you find a file namedmy/file.txtin the first place?