sendmail: move files from one to anther queue

hello, wondering if someone can help me with this.

i have a backed up sendmail queue directory which has some legitimate mail files still in it. i have searched and sorted it and have a text file listing of the exact q* and d* file pairs that contain the legitimate mails. its a text file with a few thousand messages.

i need to move those files from the old mail queue folder structure and into the active mail queue structure.

for example. i have a text file listing of files that are interspersed between folders.

/..../old-mqueue/qd1
/..../old-mqueue/qd2
/..../old-mqueue/qd3
/..../old-mqueue/qd4

i am trying to moved them all into directory
/..../old-mqueue/qd5

I am trying to pipe the output of

grep . file-list.txt

If anyone can give some tips.

Assuming I've understood what you want correctly:
while read filename ; do mv $filename /..../old-mqueue/qd5 ; done < file-list.txt

thank you. i will try that.