Locate and Move files to a destination [closed]

I intend to locate some files matching a certain pattern. After the files have been located, i want to move them to a new directory.

for i in $(find <search_location> -name '<search_pattern>')
do
    #mkdir -p <new_location_to_be_copied_to>
    mv $i <new_location_to_be_copied_to>
done

Can the above code achieve that. Any better way to achieve that?


UPDATE

After Executing the above, some abnormalities were observed. The search string inputted was not correctly filtered.

scenario:

  1. search string : ABA
  2. Some item list: ABA-LND-21052021.jpg IKS-ABA-18022020.jpg
  3. Result: Moved both items to destination folder
  4. Expected Result: Move only ABA-LND-21052021.jpg to destination Folder

I prefer to create the folder before the loop if it's the same (optimisations are everywhere :D )

So, I have the following (tested on Ubuntu 18.04) :

mkdir -p <destination_folder>
for i in $(find <source_folder> -name '<pattern>')
do
    mv $i <destination_folder>
done