Thanks!!!
Thanks for the support!
Before posting, please read how to report bug or request support effectively.
Bug reports without an attached log file are usually useless.
set tfile="I want this as a text file in the server"
echo %tfile% | winscp /stdin /log="C:\sftp\logwinscp.log" /ini=nul /command ^
"open sftp://user@site.files.com/ -hostkey=""ssh-rsa 4096 xxxxxxxxxxxxxcvvieGg1R2Vx8/5VSw="" -privatekey=""C:\sftp\private.ppk""" ^
"put - new.txt" ^
"exit"
/stdin
and /stdout
but could not find the answer.
echo %tfile% > new.txt
set tfile="I want this as a text file in the server"
winscp /log="C:\sftp\logwinscp.log" /ini=nul /command ^
"open sftp://user@site.files.com/ -hostkey=""ssh-rsa 4096 xxxxxxxxxxxxxcvvieGg1R2Vx8/5VSw="" -privatekey=""C:\sftp\private.ppk""" ^
"put ????? new.txt" ^
"exit"