Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi All
I have over 2000 csv files in a folder all with exactly the same structure and i need to concatenate them all together.
I am thinking i can do something like this as they will auto concatenate but I also need to store in a field the name of the file where each record came from and I am unsure how best to achieve that. Any advice welcome.
For each File in FileList('$(vPath)\*.csv')
TableName:
Load
Field1,
Field2,
FieldN
From $(File);
NEXT
Hi Paul,
Select one file from the csv files
add this to your script to get the filename
FileName() as Filename
and to load all 2000 csv files place a * after the part of the filename most common with all 2000 csv's
Alan
Hi Paul,
Select one file from the csv files
add this to your script to get the filename
FileName() as Filename
and to load all 2000 csv files place a * after the part of the filename most common with all 2000 csv's
Alan
Also check a video by Steve Dark on youtube called
That looks very useful, and may just do the trick - thanks
All filenames are completely different sadly
Thanks - i'll take a look at that
If the names are completely different it's fine just say
myfolderstructure\*.csv
Perfect - Thank you - easier than i thought