Merging Two Text Files into One CSV File

前端 未结 3 1607
轻奢々
轻奢々 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:32

    This Windows batch file will do what you want without the need for the intermediate files.

    @ECHO OFF
    
    FOR %%i IN (*.txt) DO ECHO %%~fi,%%~ni
    

    You can get the output of this batch into a text file by redirecting the output like this:

    MyBatch.cmd>>Output.txt
    

提交回复
热议问题