Want to win a PS4? Go Premium and enter to win our High-Tech Treats giveaway. Enter to Win

x
?
Solved

access director and file information via sql command

Posted on 2014-04-10
3
Medium Priority
?
186 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 1040 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

Free Backup Tool for VMware and Hyper-V

Restore full virtual machine or individual guest files from 19 common file systems directly from the backup file. Schedule VM backups with PowerShell scripts. Set desired time, lean back and let the script to notify you via email upon completion.  

Question has a verified solution.

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

When we purchase storage, we typically are advertised storage of 500GB, 1TB, 2TB and so on. However, when you actually install it into your computer, your 500GB HDD will actually show up as 465GB. Why? It has to do with the way people and computers…
An alternative to the "For XML" way of pivoting and concatenating result sets into strings, and an easy introduction to "common table expressions" (CTEs). Being someone who is always looking for alternatives to "work your data", I came across this …
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 Micro Tutorial will teach you how to reformat your flash drive. Sometimes your flash drive may have issues carrying files so this will completely restore it to manufacturing settings. Make sure to backup all files before reformatting. This w…

604 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