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
 General SQL Server Forums
 New to SQL Server Programming
 search files

Author  Topic 

itpriyesh88
Starting Member

13 Posts

Posted - 2012-05-27 : 01:53:43
Can somebody help me in searching files using sql...
like, based on some text..

suppose i want to search all files that has a file name abc(file may be a abc.txt,abc.pdf,abc.jpeg etc).

any solutions??
Thanks in advance...

visakh16
Very Important crosS Applying yaK Herder

52326 Posts

Posted - 2012-05-27 : 02:00:41
one method is using dos commands by calling xp_cmdshell
another method is using ssis foreachloop container

see an illustration here

http://visakhm.blogspot.com/2012/05/package-to-implement-daily-processing.html

------------------------------------------------------------------------------------------------------
SQL Server MVP
http://visakhm.blogspot.com/

Go to Top of Page

itpriyesh88
Starting Member

13 Posts

Posted - 2012-05-27 : 02:16:50
Whether xp_cmdshell can be useful??
Go to Top of Page

visakh16
Very Important crosS Applying yaK Herder

52326 Posts

Posted - 2012-05-27 : 02:22:49
quote:
Originally posted by itpriyesh88

Whether xp_cmdshell can be useful??


why not? you can make use of dos commands inside it

------------------------------------------------------------------------------------------------------
SQL Server MVP
http://visakhm.blogspot.com/

Go to Top of Page
   

- Advertisement -