Merging Two Text Files into One CSV File

前端 未结 3 1641
轻奢々
轻奢々 2021-01-23 01:56

I\'m working with a windows batch command to create a list of filepaths and filenames (without the ext) for processing and archival. I need to make a CSV file that will contain

3条回答
  •  半阙折子戏
    2021-01-23 02:51

    This could be a job for the SQLite shell.

    C:\Temp> sqlite3.exe
    create table paths(path text);
    create table filenames(fname text);
    .import fileListA.txt paths
    .import fileListB.txt filenames
    .separator ,
    .output FileListCSV.txt
    select * from paths p join filenames f on f.rowid = p.rowid;
    .q
    

    The SQLite shell is a single executable that will either create a persistent SQLite database in the form of a file, or create a database in memory (when, like here, without any argument in the command line).

提交回复
热议问题