Can't use "\" in file paths! This shows the file failing to open, then switching path to "/" to succeed...
#Import "<std>"
Using std..
Function Main ()
Local f:String = "C:\Windows\System32\notepad.exe" ' Never assume system paths!
If GetFileType (f) = FileType.File
Local file:FileStream = FileStream.Open (f, "r")
If file
Print "OK"
file.Close ()
Else
Print "Failed to open file " + f
file = FileStream.Open (f.Replace ("\", "/"), "r")
If file
Print "OK with slashes switched to " + f.Replace ("\", "/")
file.Close ()
Endif
Endif
Endif
End
Original Author: DruggedBunny
Can't use "\" in file paths! This shows the file failing to open, then switching path to "/" to succeed...