declare @mysqldir varchar(255), @skipfiles varchar(8000)
select @mysqldir = 'C:\Documents and Settings\Umachandar Jayachand\My Documents',
        @skipfiles = '~exclude.txt~'
select *
from openquery(filesystem,
'select Path, Directory, FileName, Size, Create, Write, Access, ShortFilename, Attrib
from scope
(
''deep traversal of
 "C:\Documents and Settings\Umachandar Jayachand\My Documents\SQL 6.x - 7.0 Scripts"'',
''deep traversal of
 "C:\Documents and Settings\Umachandar Jayachand\My Documents\SQL 7.0 Scripts"'',
''shallow traversal of
 "C:\Documents and Settings\Umachandar Jayachand\My Documents\CMD Scripts"'',
''shallow traversal of
 "C:\Documents and Settings\Umachandar Jayachand\My Documents\VFP Resources"''
)
')
where charindex('~' + [FileName] + '~', '~DelTemp.cmd~backup profile.cmd~') = 0
order by 2, 3
This page was last updated on May 01, 2006 04:28 PM.