本帖最后由 qixiaobin0715 于 2022-1-20 09:31 编辑
用批处理试试。
正常代码:- @echo off
- setlocal enabledelayedexpansion
- for /f "skip=1 tokens=1* delims=," %%a in (b.csv) do set "%%b=true"
- (for /f "tokens=1* delims=," %%i in (a.csv) do (
- if defined %%j (
- echo,%%i,%%j,已完成
- ) else (
- echo,%%i,%%j
- )
- ))>c.csv
- move c.csv a.csv
- pause
复制代码 合并成一行:- @setlocal enabledelayedexpansion&(for /f "skip=1 tokens=1* delims=," %%a in (b.csv) do set "%%b=true")&(for /f "tokens=1* delims=," %%i in (a.csv) do (if defined %%j (echo,%%i,%%j,已完成) else echo,%%i,%%j))>c.csv&move c.csv a.csv
复制代码
|