CREATE TABLE #file (
line varchar(255) null
);
INSERT #file EXEC master..xp_cmdshell 'type c:\boot.ini';
SELECT * FROM #file;
-- Data from the text file:
/*
line                                                                                                                                                                                                                                                            
--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- 
[Boot Loader]
timeout=10
Default=C:\
NULL
[Operating Systems]
multi(0)disk(0)rdisk(0)partition(1)\WINNT="Microsoft Windows 2000 Server" /fastdetect
C:\="Microsoft Windows 98"
C:\CMDCONS\BOOTSECT.DAT="Microsoft Windows 2000 Recovery Console" /cmdcons
NULL
*/
SELECT count(*) AS NumLines FROM #file;
/*
NumLines    
----------- 
          9 
*/
This page was last updated on May 01, 2006 04:28 PM.