Solved

access director and file information via sql command

Posted on 2014-04-10
3
176 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

Optimizing Cloud Backup for Low Bandwidth

With cloud storage prices going down a growing number of SMBs start to use it for backup storage. Unfortunately, business data volume rarely fits the average Internet speed. This article provides an overview of main Internet speed challenges and reveals backup best practices.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
SSRS 2013 - Creating a summarized report 19 33
What's wrong with this T-SQL Foreign Key? 7 42
Server backups 5 40
error in my cursor 5 27
Having issues meeting security compliance criteria because of those pesky USB drives? Then I can help you! This article will explain how to disable USB Mass Storage devices in Windows Server 2008 R2.
Ever notice how you can't use a new drive in Windows without having Windows assigning a Disk Signature?  Ever have a signature collision problem (especially with Virtual Machines?)  This article is intended to help you understand what's going on and…
Windows 8 comes with a dramatically different user interface known as Metro. Notably missing from the new interface is a Start button and Start Menu. Many users do not like it, much preferring the interface of earlier versions — Windows 7, Windows X…
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 …

776 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