- @echo off&setlocal enabledelayedexpansion
- for /f "tokens=1* delims=,," %%a in (1.txt) do set %%a=%%b
- for /f "tokens=1* delims=,," %%a in (2.txt) do (
- if not defined %%a (>>没有价格的东西.txt echo;%%a,!%%a!) else (
- set /a n=%%b*!%%a!
- >>3.txt echo %%a,%%b,!%%a!,!n!
- )
- )
- start 3.txt
- start 没有价格的东西.txt
复制代码
|