I have a folder called X which inside has many folders and sub-folders. I want to search in all of the folders inside X and find a specific document type. For example xlsx and transform each file into an xls file. In this case I need to use the libreoffice convert option like
libreoffice --headless --convert-to xls but here is the catch. After conversion each converted file should be in the same folder as the original xlsx file.
X/ Folder 1/ Folder 2/ Folder 2.1/file.xlsx Folder 3/ Folder 4/ Folder 4.1/anotherFile.xlsx
X/ Folder 1/ Folder 2/ Folder 2.1/file.xls Folder 2.1/file.xlsx Folder 3/ Folder 4/ Folder 4.1/anotherFile.xls Folder 4.1/anotherFile.xlsx
The new xls* in this case, will be converted on the same folder as the original xlsx. This will be done inside all sub-folders and to all xlsx that are found.