简体   繁体   中英

How to create a file in windows using command prompt with some multi-line text?

Is there a way to create a file with some multi-line text in windows using command prompt only?

I am trying to create a file in windows using command prompt with some multi-line text. I have tried using echo, type but they are only storing first line of text in the newly created file.

line1 = 'KT p:CN=sapserv2, OU=SAProuter, O=SAP Trust Community II, C=DE 192.168.0.76\n# SNC-connection from SAP to local system for R/3-Support\nP 192.168.0.16 192.168.0.76 3299\nD * * *'

echo line1 > file1.txt

I am expecting a file with multi-line text using only command prompt.

尝试这个:

(echo Line1 & echo.Line2 & echo.Line3) > file

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM