且构网

分享程序员开发的那些事...
且构网 - 分享程序员编程开发的那些事

使用批处理将 .csv 文件中的列复制到另一个

更新时间:2023-01-30 19:10:45

@ECHO OFF
SETLOCAL
(
FOR /f "tokens=1-3delims=," %%a IN (q22334682.txt) DO (
 ECHO(%%a,%%b,%%c,%%a
)
)>new.csv

GOTO :EOF

-Assuming that the case of the class header on the generated column in the file should match that in column 1.

I used a file named q22334682.txt for my testing, putting the result in new.csv.