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

首頁 > 編程 > BAT > 正文

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

2020-07-26 20:11:44
字體:
來源:轉載
供稿:網友

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片在线观看网站 | 亚洲高清视频在线 | 久久精选视频 | 手机看片福利 | 国产不卡视频在线观看 | 青草免费视频 | 五月天婷婷国产精品 | 日韩欧美精品区 | 欧美亚洲二区 | 久久成人精品视频 | а天堂中文最新一区二区三区 | 日韩视频二区 | 久久三区 | 亚洲综合99 | 超碰在线播| 免费黄色av | 91久久久精品视频 | 黄色地址 | 中文字幕不卡在线 | 欧美一区二区三区视频在线观看 | 日韩精品在线一区 | 欧美一区二区三区四区视频 | 国产精品国产三级国产普通话99 | a毛片| 日韩国产一区二区三区 | 亚洲二区在线 | 国产免费自拍视频 | 精品国产成人 | 羞视频在线观看 | 在线免费看污网站 | 伊人电影综合 | 久久久国产精品入口麻豆 | 午夜影院18 | 成人1区2区 | 日日夜夜欧美 | 在线视频日韩 | 97精品在线| 欧洲毛片基地 | 日韩精品一区在线观看 |