Solved

access director and file information via sql command

Posted on 2014-04-10
3
182 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
3 Comments
 
LVL 38

Expert Comment

by:Gerwin Jansen, EE MVE
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 27

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 38

Expert Comment

by:Gerwin Jansen, EE MVE
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

Use Case: Protecting a Hybrid Cloud Infrastructure

Microsoft Azure is rapidly becoming the norm in dynamic IT environments. This document describes the challenges that organizations face when protecting data in a hybrid cloud IT environment and presents a use case to demonstrate how Acronis Backup protects all data.

Question has a verified solution.

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

Suggested Solutions

Concerto Cloud Services, a provider of fully managed private, public and hybrid cloud solutions, announced today it was named to the 20 Coolest Cloud Infrastructure Vendors Of The 2017 Cloud  (http://www.concertocloud.com/about/in-the-news/2017/02/0…
The question appears often enough, how do I transfer my data from my old server to the new server while preserving file shares, share permissions, and NTFS permisions.  Here are my tips for handling such a transfer.
In this video, we discuss why the need for additional vertical screen space has become more important in recent years, namely, due to the transition in the marketplace of 4x3 computer screens to 16x9 and 16x10 screens (so-called widescreen format). …
This tutorial will walk an individual through the process of installing the necessary services and then configuring a Windows Server 2012 system as an iSCSI target. To install the necessary roles, go to Server Manager, and select Add Roles and Featu…

737 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