• Why are you not getting the file name and path from msdb?

    Are you comfortable with the security issues related with using xp_cmdshell?