- 帖子
- 12
- 积分
- 13
- 技术
- 0
- 捐助
- 0
- 注册时间
- 2010-11-15
|
3楼
发表于 2010-11-15 17:45
| 只看该作者
@echo off
for /f "tokens=1,2 delims=," %%i in (1.txt) do for /f "tokens=1,2 delims=," %%k in (2.txt) do (
if %%i==%%k set /a valu=%%j*%%l echo %%k,%%l,%j,%valu%>>3.txt )
for /f "tokens=3 delims=," %%a in (3.txt) do set /a num+=%%a echo 总价:%num%>>3.txt
@echo. >>3.txt
@echo off
for /f "tokens=1,2 delims=," %%i in (2.txt) do (
find "%%i" 1.txt
if errorlevel=1 (
echo ................................................>>3.txt
echo 下面是没有价格的东西:>>3.txt
echo %%i,%%j >>3.txt
)
)
这是我的代码,只能实现没有价格的能统计出来,有价格的不能实现,请各位高手给看看。 |
|