I have an requirement to copy files from one folder and move it to other folder. An excel file (details/config file) will have the list of files and path to be copied, while copying and moving have to get the file details like file size, file type. All file details copied has to be inserted to a table and files that could not be processed has to be updated in a source table that is a replica of the config excel file. I have only 1.5 months of experience in pentaho and a detailed explanation will be a good help In detail
- I have inserted all details like file name and path to a table.
- In a transformation/job I can get each row from the source table and I can copy all files from source folder to destination folder in one shot using copy file or process files.
- But could not find a right component to get the file size and type while processing this file movement.
You can use the
Get file namesstep to get information about each file like type, size, extension, etc. In theGet file namesstep you can specify the field containing each file's destination or use a wildcard to get the matched file in your desired directory. In yourProcess filesstep you can addError Handlingto manage a file that could not be processed like updating the source table.