有人请帮助......哦,我会很感激。 我有一个是每个用户输入的输入时间正常使用,只是一个很长的批处理文件,它取代了所需的文件字符串,但是它在文件中去掉!小号造成由于问题,他们是XML配置文件和这些评论需要留出部分。 我不会把整个代码在这里,除非要求,但在坚果壳,用户进行一定的输入,然后在批处理文件运行......这里是一个文件中的代码的一部分....用户输入驱动器安装的信和BDI服务器的名称。 我希望用户输入更换%驱动器%和%bdi1%......这确实....但我不希望它来代替注释掉部分...即:
<!-- Tcp message preamble and postamble are flags that mark the beginning and end of an HL7 message. turns into <-- Tcp message preamble and postamble are flags that mark the beginning and end of an HL7 message.
注意到没有!
这里是我的代码...什么我需要做的就是它停止去除! 我试图在这里寻找上,我想我很好在我与杰布的回答方式,但我不能让它开始工作。 提前致谢
if exist newfile.txt del newfile.txt
for /F "usebackq delims=" %%a in ("%drive%:\mckesson\%bdi1%\importer.config") do (
set str=%%a
set str=!str:server_name=%server%!
echo !str! >> newfile.txt
)
del importer.config
rename newfile.txt importer.config
if exist newfile.txt del newfile.txt
for /F "usebackq delims=" %%a in ("%drive%:\mckesson\%bdi1%\importer.config") do (
set str=%%a
set str=!str:bdi_name=%bdi1%!
echo !str! >> newfile.txt
)
del importer.config
rename newfile.txt importer.config
if exist newfile.txt del newfile.txt
for /F "usebackq delims=" %%a in ("%drive%:\mckesson\%bdi1%\importer.config") do (
set str=%%a
set str=!str:share_name=%share%$!
echo !str! >> newfile.txt
)
del importer.config
rename newfile.txt importer.config
if exist newfile.txt del newfile.txt
for /F "usebackq delims=" %%a in ("%drive%:\mckesson\%bdi1%\importer.config") do (
set str=%%a
set str=!str:drive_bdi=%drive%!
echo !str! >> newfile.txt
)
del importer.config
rename newfile.txt importer.config