I'm using the following sp on SQL Server 2005:
create procedure [dbo].[get_file_info](
@file_name varchar(255)
,@file_date datetime output
,@file_size bigint output
) AS
BEGIN
declare @dir table(id int identity primary key, dl varchar(255))
declare @cmd_name varchar(255),@fdate datetime,@fsize...