Zend certified PHP/Magento developer

Using command prompt or power shell, is there a way to move a bunch of pdfs to different folders based on the file name and folder name?

I have over 1000 pdfs that I need to move to their own folders. The pdfs are named “TRR 0000.pdf”, where the 0000 changes, but the TRR always remains the same. So “TRR 0000.pdf” needs to move to the folder “0000”. The folders have already been created and I just need an efficient way to transfer the pdfs to their corresponding file.