I'm inserting info from the sp getfiledetails into a temp table as below:
FETCH NEXT FROM cur INTO @Filename
WHILE @@FETCH_STATUS = 0
SET @Filename = @Directory + @Filename
INSERT #FileInfo EXEC xp_getfiledetails @Filename
FETCH NEXT FROM cur into @Filename
This is working fine, however I want to add the info from the @Filename variable also into the #FileInfo table how can I do that ?