How to copy all linked files in one .md file to a folder

What I’m trying to do

I have a note file (.md) with a list of links to other files (pdf, docx…).
Is there any way to have all the linked files to be copied to a specified folder?
I need to send the note (exported as pdf) content with all these files to a friend.

Things I have tried

Could not find a solution

Many thanks