a亚洲精品_精品国产91乱码一区二区三区_亚洲精品在线免费观看视频_欧美日韩亚洲国产综合_久久久久久久久久久成人_在线区

首頁 > 編程 > BAT > 正文

批處理生成幾乎任何字符,包括Tab

2020-06-09 14:27:07
字體:
來源:轉載
供稿:網友

One of my early posts on DosTips was a :chr routine that could convert a number into the corresponding character. The final code that appears near the end of the thread works really well, and is fast, but nearly all the characters must be embedded in the script. The TAB character in particular can be problematic, especially when trying to post the code on a forum site.

There is the undocumented %=ExitCodeAscii% dynamic variable that converts the most recent error code (from EXIT, not EXIT /B), but it is limited to codes between 32 and 126.

I had never seen a native method to generate a TAB character that works on all Windows versions - until now

I recently ran across this FORFILES documentation gem at SS64.COM:

復制代碼 代碼如下:

To include special characters in the command line, use the hex code for the character in 0xHH format (ex. 0x09 is theTAB character, 0x22 is the double quote " character.)

Eureeka :idea: - The following simple printHex routine can generate any byte code value except 0x00 (nul), 0x0A (newline), and 0x0D (carriage return). 8)

@echo offsetlocal::Define a Linefeed variableset LF=^::above 2 blank lines are critical - do not remove.::Create a TAB variablecall :hexprint "0x09" TAB::Print a string with encoded TABscall :hexprint "A0x09B0x09C"::Create a string variable with encoded TABscall :hexprint "A0x09B0x09C" varset varexit /b:hexPrint string [rtnVar] for /f eol^=^%LF%%LF%^ delims^= %%A in ( 'forfiles /p "%~dp0." /m "%~nx0" /c "cmd /c echo(%~1"' ) do if "%~2" neq "" (set %~2=%%A) else echo(%%Aexit /b

I'll be playing Native American style flutes at a retreat in the Blue Ridge Mountains of Virginia for the next 4 days :D , without computer access :|
I wanted to post this before I left.

Enjoy the code, while I enjoy the crisp fall air. :)

Dave Benham

發表評論 共有條評論
用戶名: 密碼:
驗證碼: 匿名發表
主站蜘蛛池模板: 日韩性猛交 | 先锋影音av资源站 | 久久靖品| 久久亚洲视频 | 欧美国产日韩一区 | 国产精品视频免费观看 | 欧州一区二区三区 | 毛片一区 | 欧洲美女7788成人免费视频 | 精品国产一区二区三区久久影院 | 日韩精品在线网站 | 日韩视频在线观看视频 | 高清av在线| 偷拍自拍亚洲色图 | 国产精品免费在线 | 黄色免费av网站 | 精品国产精品三级精品av网址 | 99精品视频免费观看 | av一区二区在线播放 | 久久9色| 国产成人精品久久 | 日韩精品 | 久久这里只有精品首页 | 精品一区二区三区免费毛片爱 | 福利视频一区二区 | 国产97碰免费视频 | 97成人在线免费视频 | 久久精品亚洲精品 | 亚洲协和影视 | av电影院在线观看 | 久久免费视频播放 | 亚洲一区二区三区在线播放 | 日本好好热视频 | 亚洲色图综合网 | 国产精品一区久久久久 | 国产成人免费观看 | www.99热这里只有精品 | 在线看一级片 | 91精品国产综合久久国产大片 | 亚洲激情第一页 | 亚洲视频在线播放 |