• Hi, I was trying to use xp_delete_file in one of my stored procedure. I was tryign to pass all the parameters like folderPath, FileType and Date to delete the files from specific folder. If I put FileType and Date as parameter with xp_delete_file, its works like

    EXECUTE master.dbo.xp_delete_file 0,N'C:\Test\',@fileType,@cutoffDate,0

    But if I try

    EXECUTE master.dbo.xp_delete_file 0,@folderPath,@fileType,@cutoffDate,0

    I get the error Msg 22049, Level 15, State 0, Line 0

    Error executing extended stored procedure: Invalid Parameter

    Any help will be appriciated