批处理不喜欢我想写入文件的一些字符

时间:2018-03-15 01:06:01

标签: batch-file

显然我的脚本中的某些字符无效,而不是将内容写入文件,批处理应用程序只是将所有内容都回显到控制台并且不创建任何文件。有没有办法让它忽略括号之间的任何字符?我不得不删除所有的点,以避免得到"。在这个时候出人意料。"

:create
echo.
echo  Creating config...
SET "inpath=C:\Program Files (x86)\Steam\steamapps\common\Counter-Strike Global Offensive\csgo\cfg"
echo  Writing to:
echo  %inpath%\RGBUI.cfg
(
@echo // You may customize the key binds here
@echo bind "k" "incrementvar cl_hud_color 1 8 1;incrementvar cl_draw_only_deathnotices 0 1 1"
@echo bind "KP_END" "cl_hud_color 1;incrementvar cl_draw_only_deathnotices 0 1 1"
@echo bind "KP_DOWNARROW" "cl_hud_color 2;incrementvar cl_draw_only_deathnotices 0 1 1"
@echo bind "KP_PGDN" "cl_hud_color 3;incrementvar cl_draw_only_deathnotices 0 1 1"
@echo bind "KP_LEFTARROW" "cl_hud_color 4;incrementvar cl_draw_only_deathnotices 0 1 1"
@echo bind "KP_5" "cl_hud_color 5;incrementvar cl_draw_only_deathnotices 0 1 1"
@echo bind "KP_RIGHTARROW" "cl_hud_color 6;incrementvar cl_draw_only_deathnotices 0 1 1"
@echo bind "KP_HOME" "cl_hud_color 7;incrementvar cl_draw_only_deathnotices 0 1 1"
@echo bind "KP_UPARROW" "cl_hud_color UPARROW;incrementvar cl_draw_only_deathnotices 0 1 1"
@echo echo 
@echo echo 
@echo echo DarkMesa's RGBUI is now loaded.
@echo echo Use NumPad keys to change GUI color
@echo echo or K to scroll through them (doubleclick)
@echo ehco 
@echo echo You are using version 1.0 - Updates might
@echo echo be available, Check the Official Guide
@echo echo to find out
@echo echo 
@echo echo You may contact me on my Steam Profile:
@echo echo http://steamcommunity.com/id/darkmesah/
@echo echo 
@echo echo 
) >"%inpath%\RGBUI.cfg"

0 个答案:

没有答案