=SUM(INDIRECT("'"&F2&"'!$D$2:$D$9999"))

there is no need to mention file extension if both sheets are in same workbook