The
While the
WinSCP needs either UTF-8-encoded script file; or a BOM to identify, that the file uses a different UTF encoding (such as UTF-16)
See https://winscp.net/eng/docs/scripting#using_scripting
20170601_121717.txt
is saved in UTF-16 encoding without a BOM.
While the
20170601_121717_savedInNotepad.txt
has the BOM. Note that it's two bytes larger (that's the BOM).
WinSCP needs either UTF-8-encoded script file; or a BOM to identify, that the file uses a different UTF encoding (such as UTF-16)
See https://winscp.net/eng/docs/scripting#using_scripting