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.

 All Forums
 SQL Server 2005 Forums
 Transact-SQL (2005)
 xp cmdshell commands

Author  Topic 

carumuga
Posting Yak Master

174 Posts

Posted - 2008-07-24 : 09:18:40
Hi,

I need a code which should look for the particular folder (d:\test)
and find out the COUNT of the files (not the directory), if it has >= 3 files, the system should compare with my predefined date, something 2008-07-09 with the filedates and accordingly i should process...further.

So is there any way in TSQL where i can find out the count of the files and compare predefined date with the file date in the archive folder (predefined > filedate)

visakh16
Very Important crosS Applying yaK Herder

52326 Posts

Posted - 2008-07-24 : 09:45:18
this should give you a start

http://www.planet-source-code.com/vb/scripts/ShowCode.asp?txtCodeId=1002&lngWId=5
Go to Top of Page
   

- Advertisement -