Board logo

标题: [其他] 提示运算符不存在,麻烦看看问题出在哪 [打印本页]

作者: 反璞归真    时间: 2021-12-31 15:28     标题: 提示运算符不存在,麻烦看看问题出在哪

echo WScript.Echo Wscript.Arguments(0)/return(data/Convert.ToDouble(1024)/Convert.ToDouble(1024)/Convert.ToDouble(1024))
作者: Batcher    时间: 2021-12-31 16:48

回复 1# 反璞归真


    请把完整代码发出来看看吧
作者: 反璞归真    时间: 2022-1-4 11:18

echo WScript.Echo Wscript.Arguments(0)/return(data/Convert.ToDouble(1024)/Convert.ToDouble(1024)/Convert.ToDouble(1024))
for /f "tokens=2 delims==" %%a in ('wmic memorychip get Capacity /value ^| findstr /i "Capacity"') do (
    for /f "tokens=1 delims=." %%b in ('cscript /nologo Calculation.vbs "%%~a"') do set /a m+=%%~b
)
call echo   内存容量:%%m%% GB
for /f "tokens=2 delims==" %%a in ('wmic DiskDrive get Size /value ^| findstr /i "Size"') do  (
    for /f "tokens=1 delims=." %%b in ('cscript /nologo Calculation.vbs "%%~a"') do set /a d+=%%~b
)
call echo   硬盘容量:%%d%% GB




欢迎光临 批处理之家 (http://bbs.bathome.net/) Powered by Discuz! 7.2