chilly_bang
Board Regular
- Joined
- Jun 17, 2016
- Messages
- 57
I have a folder C:\\data. In this folder are placed time-stamped folders with files, like C:\\d\2020.11.26.16.45.12\data.csv, C:\\d\2020.11.27.16.45.13\data.csv, C:\\d\2020.11.28.16.45.14\data.csv. All files have same names, column headings and column amount.
I want to merge all CSV files from the folder C:\\data and write merged CSV into another folder, like C:\\merged\merged.csv and to add to each portion of the merged data the first 10 characters of the corresponding folder name, so i get the date column.
Example: on merging of the file C:\\d\2020.11.26.16.45.12\data.csv into the first or last column is written 2020.11.26 or, much better, manipulated to 2020-11-26. I will run this script at CMD daily with WIndows Tasks Scheduler.
I've found a solution which works only partly for me: Bulk combine csv files and create column with file name - it doesn't do searching though subfolders and it writes the whole filename into additional column.
Has anyone ideas about a solution, maybe based on the script i cited, or maybe a completely different one?
Thanks on beforehand and kindly greets from Berlin!
I want to merge all CSV files from the folder C:\\data and write merged CSV into another folder, like C:\\merged\merged.csv and to add to each portion of the merged data the first 10 characters of the corresponding folder name, so i get the date column.
Example: on merging of the file C:\\d\2020.11.26.16.45.12\data.csv into the first or last column is written 2020.11.26 or, much better, manipulated to 2020-11-26. I will run this script at CMD daily with WIndows Tasks Scheduler.
I've found a solution which works only partly for me: Bulk combine csv files and create column with file name - it doesn't do searching though subfolders and it writes the whole filename into additional column.
Has anyone ideas about a solution, maybe based on the script i cited, or maybe a completely different one?
Thanks on beforehand and kindly greets from Berlin!
Last edited: