[新手上路]批处理新手入门导读[视频教程]批处理基础视频教程[视频教程]VBS基础视频教程[批处理精品]批处理版照片整理器
[批处理精品]纯批处理备份&还原驱动[批处理精品]CMD命令50条不能说的秘密[在线下载]第三方命令行工具[在线帮助]VBScript / JScript 在线参考
返回列表 发帖
Get到一个新知识。
改成适合自己的
  1. @echo off
  2. setlocal enabledelayedexpansion
  3. echo 1.百度 2.淘宝 3.BatHome
  4. choice /c 123
  5. if %errorlevel%==1 set URL=https://www.baidu.com/s?wd=
  6. if %errorlevel%==2 set URL=https://s.taobao.com/search?q=
  7. if %errorlevel%==3 set "URL=http://zhannei.baidu.com/cse/search?s=1324540215625407466&entry=1&ie=gbk&q="
  8. echo.
  9. 2>nul (
  10. :keyword
  11. set /p keyword=要找什么?
  12. if "!keyword!" EQU "" echo keyword不能为空&goto :keyword
  13. set /p _=!keyword!<nul >#
  14. if exist $ del $
  15. for %%# in (#) do fsutil file createnew $ %%~z# >nul
  16. for /f "tokens=2" %%# in ('fc /b # $') do if %%# NEQ # set URL=!URL!%%%%#
  17. del #
  18. del $
  19. start "" "!URL!"
  20. )
复制代码

TOP

返回列表