dump Blob field to a folder ...for all table's records

Hello ,
maybe some mySQL guru can easily help me.
I got a table with Blob field (pdf documet) and I want to copy it as pdf file into a directory . Everybody don’t suggest to use images directly into a blob becouse it slows down db performance.
I did find googling the command to dump a record but I need to do it for all records once.

Can you help me to run it against all table records without specify manually every id ? Thanks

Select id, blob into dumpfile ‘C:\Users\Asus\Downloads\14_FILE.pdf’ from table where id = ‘14’;

Something like ‘C:\Users\Asus\Downloads\’. @var_id . ‘FILE.pdf’ … where id = @var_id

Maybe you must Create a CURSOR for all records with the ID, and then with a LOOP apply the Command for Dump. The filename must have the Variable ID.
Here a Foroum about that:
http://stackoverflow.com/questions/4646533/exporting-blob-from-mysql-database-to-file-with-only-sql

Thanks for help but I’m not tech guy and so if the query is a bit complex I’m not able to write it… ;-((

Now I did write this …

SELECT CONCAT( IdTrack, ‘’, IdDoc ) , ImgDoc, CONCAT( ‘D:\EOS\GESTIONE GARE\PDF_FILES\’, IdTrack, '’, IdDoc, ‘.pdf’ )
FROM gare-altridoc

and it works … D:\EOS\GESTIONE GARE\PDF_FILES\40_5.pdf
for all records…changing the file name automatically

when I add “into dumpfile” for the blob field…ImgDoc it gives me error

Select concat(IdTrack,’’,IdDoc) , ImgDoc into dumpfile concat(‘D:\EOS\GESTIONE GARE\PDF_FILES\’, IdTrack,’’,IdDoc ,’.pdf’) from gare-altridoc

Nobody knows how to loop within the same table in presence of “into dumpfile” within SELECT ??? I thought it was a easy question…