Shift+RightClick a file on windows explorer and select 'copy as path', then ctrl+v paste to mathematica notebook, then apply
But the same method produces
False sometimes :
because in the string "\nircmd-x64", the character "\n" is interpreted as LF.
In fact for ex1), we got
True with some error messages.
The reason for the error message is
The use of "\U" or "\P" or "\D" or "\F" are not allowed, because backslash is a special character that needs one more backslash in front of it, to be part of a string. I mean, they should be "
I think that mathematica showed automatic correction ability for ex1).
But in ex2), mathematica didn't/couldn't show such ability for "\n" in "\nircmd-x64", becuase "\n" is just LF.
So when we do 'file/folder path copy and paste job' in mathematica, we need
(processing the content of clipboard then paste)
(some process in mathematica after pasting the clipboard content to a mathematica notebook).
At present, I am using a post-processing method, probably easiest but the most inefficient : searching problematic backslashes (like \n, \r,..) with eyes, and typing one more backslash before such backslashes with fingers.
What kind of method do you use?
The method should be automatic and work for multiple files and folders.