Move all files in a folder that match a subfolder name into that subfolder
Really stuck here.
I've managed to get all files exported into a folder that looks like the following:
project-name-1-portrait.jpg
project-name-1-landscape.jpg
project-name-1-square-large.jpg
project-name-1-square-small.jpg
project-name-2-portrait.jpg
project-name-2-landscape.jpg
project-name-2-square-large.jpg
project-name-2-square-small.jpg
etc...
In this folder also exists subfolders named:
project-name-1
project-name-2
etc...
What script would I place at the end of my script that would go through and clean up these files by moving the appropriate file into its appropriate matching folder?
Thanks in advance!
