Solved

access director and file information via sql command

Posted on 2014-04-10
3
174 Views
Last Modified: 2014-04-23
Is there a way to be able to perform select statements against a drives directories and files with out having import a text file of a dir >

Thanks
0
Comment
Question by:HalCHub
  • 2
3 Comments
 
LVL 37

Expert Comment

by:Gerwin Jansen
ID: 39993838
Windows directory and file information is stored in the Windows file system, to my knowledge you cannot run a SQL statement against that 'database'.

But scheduling a Windows task to create the text file that has all files and directories and importing that into a database may get you what you want.
0
 
LVL 26

Accepted Solution

by:
skullnobrains earned 260 total points
ID: 39996106
you can run regular commands over the sql connection (dir, type, cat, ...)

http://technet.microsoft.com/en-us/library/aa260689%28v=sql.80%29.aspx

you should even be able to create a view based on xp_cmdshell that will let you actually use select queries and the likes but i assume you don't actually need that.
0
 
LVL 37

Expert Comment

by:Gerwin Jansen
ID: 40017770
@HalCHub - Does last comment above answer your question? Can you show for example how you 'select' all files with a .txt extension from a certain directory? That is what you were asking, right?
0

Featured Post

Save on storage to protect fatherhood memories

You're the dad who has everything. This Father's Day, make sure your family memories are protected. My Passport Ultra has automatic backup and password protection to keep your cherished photos and videos safe. With up to 3TB, you have plenty of room to hold the adventures ahead.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

If you have heard of RFC822 date formats, they can be quite a challenge in SQL Server. RFC822 is an Internet standard format for email message headers, including all dates within those headers. The RFC822 protocols are available in detail at:   ht…
Create your own, high-performance VM backup appliance by installing NAKIVO Backup & Replication directly onto a Synology NAS!
This video Micro Tutorial explains how to clone a hard drive using a commercial software product for Windows systems called Casper from Future Systems Solutions (FSS). Cloning makes an exact, complete copy of one hard disk drive (HDD) onto another d…
This video teaches viewers how to encrypt an external drive that requires a password to read and edit the drive. All tasks are done in Disk Utility. Plug in the external drive you wish to encrypt: Make sure all previous data on the drive has been …

895 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

18 Experts available now in Live!

Get 1:1 Help Now