• forgot to add some important details. reason I'm doing it this way is because I'm passing the variable @PDFFileName into a email template using:

    REPLACE(REPLACE(HTML,'[[FileName]]',@ProcessingFile),'[[PDF_FileName]]',@PDFFileName)