Link to home
Start Free TrialLog in
Avatar of jburgaard
jburgaard

asked on

Build CSV from directory of text-files

In a directory I have a lot of small txt-files. In each of theese there is one line of text.
I want to make one file to import to excel. Content of this file should bee one line per org.file , in the format: name_of_file ; date_of_file ; content_of_file new-line ....
ASKER CERTIFIED SOLUTION
Avatar of oBdA
oBdA

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
to combine all the files together you can use TYPE in a .bat file
But this will just combine the files, not putting the filename or date.

Example below:
TYPE "C:\Users\Public\Temp\*.txt" > "C:\Users\Public\Temp\Combined.txt"

Open in new window

Avatar of jburgaard
jburgaard

ASKER

Pure magic!