June 3, 2008 at 12:19 am
Hi all,
I need to get no of files in separate folder, files name in separate folder, and specific file created date
Ex: C:\Tharindu (Foldre name)
No of file =5
Files are, create date
Abc.txt 01/01/2008
Abc1.txt01/02/2008
Abc2.txt01/03/2008
Abc3.txt01/04/2008
Abc4.txt01/05/2008
thanks
Tharindu Dhaneenja.
MCTS,MCITP(SQL Server),OCA(Oracle)
http://www.databaseusergroup.com
June 3, 2008 at 12:22 am
A little bit off the cuff, but BIDS may be able to assist you with this one.
Create a for each file enumerator, and increment a count variable with 1 each time the loop increments.
TADA, a count of the files in your folder. There are most probably more optimal ways of doing this, but this way involves minimal amount of coding.
June 3, 2008 at 5:40 pm
Try this:
EXEC xp_CmdShell N'Dir C:\Tharindu'
[font="Times New Roman"]-- RBarryYoung[/font], [font="Times New Roman"] (302)375-0451[/font] blog: MovingSQL.com, Twitter: @RBarryYoung[font="Arial Black"]
Proactive Performance Solutions, Inc. [/font][font="Verdana"] "Performance is our middle name."[/font]
June 4, 2008 at 12:15 am
awesome
🙂
June 4, 2008 at 6:56 am
thanks guys it's done.
Tharindu Dhaneenja.
MCTS,MCITP(SQL Server),OCA(Oracle)
http://www.databaseusergroup.com
June 4, 2008 at 12:23 pm
glad we could help.
[font="Times New Roman"]-- RBarryYoung[/font], [font="Times New Roman"] (302)375-0451[/font] blog: MovingSQL.com, Twitter: @RBarryYoung[font="Arial Black"]
Proactive Performance Solutions, Inc. [/font][font="Verdana"] "Performance is our middle name."[/font]
Viewing 6 posts - 1 through 5 (of 5 total)
You must be logged in to reply to this topic. Login to reply