Our area is eliminating xp cmd shell as an option.
In what can the following be done without using xpcmdshell.
CREATE TABLE #temp(s varchar(2000))
SELECT @cmd_checkfile = 'dir /B "' + @sRemoteFullFileName + '"'
INSERT #temp
EXEC master..xp_cmdshell @cmd_chckfile --parameter
DBA Developer