Batch file 自动下载和搜索更新的批处理文件。它起作用了。但它会打印额外的符号,不会打印开头

Batch file 自动下载和搜索更新的批处理文件。它起作用了。但它会打印额外的符号,不会打印开头,batch-file,Batch File,它起作用,但不起作用 它印着“ (开头一个“单”,结尾一个“双”) 而且http:被删除了,这让我很烦恼 有没有办法解决这个问题 我找到了一个解决办法: @echo off cls Color 0A if exist index.html del index.html wget -q --show-progress http://cemu.info/ setlocal disableDelayedExpansion for /f delims^=^ eol^= %%A in ('findst

它起作用,但不起作用

它印着“

(开头一个“单”,结尾一个“双”)

而且http:被删除了,这让我很烦恼

有没有办法解决这个问题

我找到了一个解决办法:

@echo off
cls
Color 0A

if exist index.html del index.html
wget -q --show-progress http://cemu.info/
setlocal disableDelayedExpansion

for /f delims^=^ eol^= %%A in ('findstr /ri /c:"http://cemu.info/releases/" /c:"http://cemu.info/releases/" index.html') do (
  set "ln=%%A"
  setlocal enableDelayedExpansion
  set "ln=!ln:*:=!"
  if /i "!ln:~0,5!" equ "http://cemu.info/releases/" (set "ln=!ln:~5!") else set "ln=!ln:* "http://cemu.info/releases/ =!"
  for /f %%B in ("!ln!") do if "%%B" neq "" echo "http:%%B" > cemu_ver.txt
  endlocal
)
if exist index.html del index.html
notepad.exe cemu_ver.txt
@echo关闭
cls
颜色0A
如果存在index.html del index.html
\bin\wget-q--显示进度http://cemu.info/
setlocal disableDelayedExpansion
对于/f delims^=^eol^=%%A in('findstr/ri/c:'http://cemu.info/releases/“/c:”http://cemu.info/releases/“index.html”)怎么办(
设置“ln=%%A”
setlocal enableDelayedExpansion
设置“项次=!项次:*=!”
如果/i“!ln:~0,5!”eq”http://cemu.info/releases/“(设置“ln=!ln:~5!”)否则设置“ln=!ln:*”http://cemu.info/releases/ =!"
对于(“!ln!”)中的/f%%B,如果“%%B”neq”回显http:%%B>cemu\u ver.txt,则执行该操作
端部
)
如果存在index.html调用:添加报价
跳转报价
:添加报价

设置/p cemu\u ver=为什么如此复杂,使用
作为分隔符并获取
标记=2

@echo off
cls
Color 0A

if exist index.html del index.html
.\bin\wget -q --show-progress http://cemu.info/
setlocal disableDelayedExpansion

for /f delims^=^ eol^= %%A in ('findstr /ri /c:"http://cemu.info/releases/" /c:"http://cemu.info/releases/" index.html') do (
  set "ln=%%A"
  setlocal enableDelayedExpansion
  set "ln=!ln:*:=!"
  if /i "!ln:~0,5!" equ "http://cemu.info/releases/" (set "ln=!ln:~5!") else set "ln=!ln:* "http://cemu.info/releases/ =!"
  for /f %%B in ("!ln!") do if "%%B" neq "" echo http:%%B > cemu_ver.txt
  endlocal
)
if exist index.html call :add-quote
goto skip-quote

:add-quote
set /p cemu_ver=<cemu_ver.txt
echo "%cemu_ver% > cemu_ver.txt
del index.html
(goto) 2>NUL

:skip-quote
notepad.exe cemu_ver.txt

好的,看来这是一个关于文件如何处理后面的字符的问题。是否有任何方法可以省略字符“从被读取?基本上,我需要搜索并删除cemu_ver.txt中的”的所有实例。此外,我倾向于使用意大利面条代码。非常感谢。(我的的确管用)但你的更短更简单
@echo off
cls
Color 0A
if exist index.html del index.html
wget -q http://cemu.info/
for /f tokens^=2delims^=^" %%A in (
  'findstr /i /c:"http://cemu.info/releases/" /c:"http://cemu.info/releases/" index.html'
) Do > cemu_ver.txt Echo:"%%A"