Please start any new threads on our new 
    site at https://forums.sqlteam.com.  We've got lots of great SQL Server
    experts to answer whatever question you can come up with.
    
        | 
                
                    | 
                            
                                | Author | Topic |  
                                    | dasuPosting Yak  Master
 
 
                                        104 Posts | 
                                            
                                            |  Posted - 2004-08-17 : 10:35:33 
 |  
                                            | hello every one  really i have one problem when i tried to capture the value whichfollowing statement print.this same thing will be working at command prompt how to capture the no of rows in that file which i specified in the filepath SET @strTempCommand = 'type '+ @strPathName + ' | Find /C /V "TEXT!NOT!IN!RECORD"'EXEC master..xp_cmdshell  @strTempCommanplease suggest me better solution |  |  
                                    | raymondpeacockConstraint Violating Yak Guru
 
 
                                    367 Posts | 
                                        
                                          |  Posted - 2004-08-17 : 11:18:12 
 |  
                                          | You could use a temp table. Create a table of one column of type varchar and width 1000. Then INSERT INTO the table your EXEC statemement. This will then give you one row per result from your command plus some header and footer rows you can ignore.Raymond |  
                                          |  |  |  
                                    | dasuPosting Yak  Master
 
 
                                    104 Posts | 
                                        
                                          |  Posted - 2004-08-17 : 11:48:51 
 |  
                                          | i am more happy u send me detailed information |  
                                          |  |  |  
                                    | SeventhnightMaster Smack Fu Yak Hacker
 
 
                                    2878 Posts | 
                                        
                                          |  Posted - 2004-08-17 : 11:59:08 
 |  
                                          | --Create a table for the results.  Include a id so you can determine original row numbersCreate Table #dirOutPut (id int identity(1,1) not null, nvarchar(2000))SET @strTempCommand = 'type '+ @strPathName + ' | Find /C /V "TEXT!NOT!IN!RECORD"'--Capture dos output during executeInsert Into #dirOutPutEXEC master..xp_cmdshell @strTempComman--return captured outputSelect * From #dirOutPutCorey |  
                                          |  |  |  
                                    | dasuPosting Yak  Master
 
 
                                    104 Posts | 
                                        
                                          |  Posted - 2004-08-17 : 23:01:46 
 |  
                                          | Thank u  U r idea works for my case |  
                                          |  |  |  
                                |  |  |  |