Copy/rename files

PHOTO EMBED

Wed Aug 03 2022 15:12:18 GMT+0000 (UTC)

Saved by @jmbenedetto #bash

Let vSource='lib://LoB demos:DataFiles/';
Let vDestination= 'lib://LoB demos:DataFiles/';

let vStoreType='qvd';

[Parameters]:
LOAD * INLINE [
    original_file_name, target_file_name
    Employee_Master, A001_Employee Master
	Employee All Regions, A001_Employee All Regions
	Employee Retention Predictions_v3, A001_Employee Retention Predictions
];

FOR i = 0 TO NoOfRows('Parameters') - 1
LET vOriginalFileName = peek('original_file_name', $(i), 'Parameters');
LET vTargetFileName = peek('target_file_name', $(i), 'Parameters');


[$(vOriginalFileName)]: LOAD * from [$(vSource)$(vOriginalFileName)] ($(vStoreTypeSourceFile));
STORE [$(vOriginalFileName)] INTO [$(vDestination)$(vTargetFileName)] ($(vStoreTypeDestinationFile));
DROP TABLE [$(vOriginalFileName)];

NEXT i

exit Script
content_copyCOPY