Directory Inside View All Files Using Sql Server

 DECLARE @Dir VARCHAR(200)
 create   TABLE #tmpDir
                        (
                          subdirectory VARCHAR(MAX) ,
                          depth INT ,
                          [file] INT
                        )

 SET @Dir = FilePath
                    INSERT  #tmpDir
                            EXEC master.sys.xp_dirtree @Dir, 0, 1 ;

Post a Comment

0 Comments