I would do this with formulas, honestly.
In column b type out the 1001, 1002, 1003 (or type out the 1001 & 1002, highlight both, and drag down and it should auto populate for you.
Then use these formulas in columns c, d, & e, respectively.
=IFERROR(INDEX($A$2:$A$8,MATCH(B2&" (0).jpg",$A$2:$A$8,0)),"")
=IFERROR(INDEX($A$2:$A$8,MATCH(B2&" (1).jpg",$A$2:$A$8,0)),"")
=IFERROR(INDEX($A$2:$A$8,MATCH(B2&" (2).jpg",$A$2:$A$8,0)),"")
CLICK HERE to find out more related problems solutions.