• Crude, but this will work, just loop through a directory (if you are able to execute xp_cmdshell, if not I'm sure there's a powershell script lingering around)DECLARE

    @Filepath varchar(75),

    @file varchar(25),

    @Cmd varchar(150)

    SET @file = 'test.csv'

    SET @filepath = 'C:\'

    SET @cmd = 'ren "' + @filepath + @file + '" "' + REPLACE(@file, 'csv', 'xls') + '"'

    PRINT @cmd

    EXEC xp_cmdshell @cmd, NO_OUTPUT

    Why would you want to do this via TSQL?

    ______________________________________________________________________________Never argue with an idiot; Theyll drag you down to their level and beat you with experience