Ok so what Eric suggested works.
EDIT: I created a new thread regarding ExifTool and the command I try to use, as I find it to be off-topic in respect to this thread.
Thanks guys!
Now I can change the permission of a directory from my Lazarus app, and then manually run ExifTool from the terminal to extract the thumbnail of any photo by running the following command: exiftool -b -Thumbnailimage "path_to_file_A" > "path_to_file_B"
Now the problem I am having is that when I run that command from my lazarus app using the code below, the thumbnail is not extracted.
Is there a fix for it or does anyone know what's happening?
procedure TForm1.Button1Click(Sender: TObject);
var command_line_results: string;
begin
RunCommand('exiftool -b -Thumbnailimage "/home/pi/Desktop/myLazApp/photos/img_0001.JPG" > "/home/pi/Desktop/myLazApp/photos/Thumbnails/img_0001.JPG"', [], command_line_results');
Memo1.Lines.Add(command_line_results); //if the variable "command_line_results" is empty, then exiftool successfully extracted the thumbnail
end;
As the code suggests, if exiftool returns nothing then the thumbnail has been extracted, but when looking inside the directory given as an output, theres nothing there.
But when running the same exiftool command manually, exiftool behaves correctly.
Any suggestions?