I want to load all the qvd's into single table and create a new COUNTRY field in final table based on File name.
eg- if file name is Sales_ind* then COUNTRY field contain value as IND
Please note that all the qvds have slighly different fields, so we need to force concatenation using concatenate keyword.
change your script to below
Set vConcatenate = 0; For each vFile in FileList('.\*.qvd') if($(vConcatenate) = 0) THEN Data: LOAD * FROM [$(vFile)](qvd); Set vConcatenate = 1 ; ELSE Concatenate(Data) LOAD * FROM [$(vFile)](qvd); end if Next vFile