网站废文件如何处理?
ASP+SQL   2000 
 Windows   2003   server 
 II6.0 
 要求: 
 现在网站目录太大,如何根据物理目录上存在的文件,在网站数据库中寻找是否引用该文件,如果引用则认为是有效文件,如果未引用就认为是废文件并将其删除。   
 如何才能快速的判断数据库中是否存在某文件名?
------解决方案--------------------比如table1中filepath存放的是文件在磁盘上的路径. 
 查找c:\boot.ini在表中是否被引用 
 if exists(select 1 from table1 where charindex( 'c:\boot.ini ',filepath)> 0) 
 print  '被引有 ' 
 else 
 print  '未被引用 '