Soldato
Hi all,
I've managed to use python to append all CSVs in a folder from a script nabbed online, but am struggling to pull the below together. I wonder if anyone here is able to advise?
I have some standard template CSVs and some bespoke CSVs relating to individuals.
Below is an example of the folder structure, though this can be changed if necessary. There are hundreds of refs. All files are fairly small.
I'm using python as we use some software, which is able to run python scripts as part of the routine, to carry out actions outside of the system.
SERVER PATH\TEMPLATE
Template1.csv
Template2.csv
Template3.csv
Template5.csv
SERVER PATH\TEMPLATE4
Template4 REF1.csv
Template4 REF2.csv
Template4 REF3.csv
Template4 REF4.csv
SERVER PATH\TEMPLATE6
Template6 REF1.csv
Template6 REF2.csv
Template6 REF3.csv
Template6 REF4.csv
I'm trying to append the standard templates in every case (ie 1,2,3 and 5) and slot in the specific templates where relevant.
i.e append
Template1.csv
Template2.csv
Template3.csv
Template4 REF1.csv
Template5.csv
Template6 REF1.csv
Output - Appended REF1.csv
Template1.csv
Template2.csv
Template3.csv
Template4 REF2.csv
Template5.csv
Template6 REF2.csv
Output - Appended REF2.csv
Any ideas?
Thanks for any help
I've managed to use python to append all CSVs in a folder from a script nabbed online, but am struggling to pull the below together. I wonder if anyone here is able to advise?
I have some standard template CSVs and some bespoke CSVs relating to individuals.
Below is an example of the folder structure, though this can be changed if necessary. There are hundreds of refs. All files are fairly small.
I'm using python as we use some software, which is able to run python scripts as part of the routine, to carry out actions outside of the system.
SERVER PATH\TEMPLATE
Template1.csv
Template2.csv
Template3.csv
Template5.csv
SERVER PATH\TEMPLATE4
Template4 REF1.csv
Template4 REF2.csv
Template4 REF3.csv
Template4 REF4.csv
SERVER PATH\TEMPLATE6
Template6 REF1.csv
Template6 REF2.csv
Template6 REF3.csv
Template6 REF4.csv
I'm trying to append the standard templates in every case (ie 1,2,3 and 5) and slot in the specific templates where relevant.
i.e append
Template1.csv
Template2.csv
Template3.csv
Template4 REF1.csv
Template5.csv
Template6 REF1.csv
Output - Appended REF1.csv
Template1.csv
Template2.csv
Template3.csv
Template4 REF2.csv
Template5.csv
Template6 REF2.csv
Output - Appended REF2.csv
Any ideas?
Thanks for any help