Import existing directory listing into SQL

Mafiatone 96 Reputation points

I've been provided with several txt files of directory listings. Some files have 3m lines and it would be create to import them into SQL but they are not tabular.

An example is like this

Volume in drive C has no label.
Volume Serial Number is A6FF-140E

Directory of C:\Users\tonyh\Downloads

15/02/2021 11:35 <DIR> .
15/02/2021 11:35 <DIR> ..
27/09/2020 15:35 264,424,269 0009-64bit_Win7_Win8_Win81_Win10_R282.exe
17/12/2020 08:38 <DIR> 1usmus-ryzen-power-plan-1.1
17/12/2020 08:38 11,624
08/12/2020 08:27 1,038,831 2218285.jpg
26/10/2020 13:27 747 30765568806.png
13/10/2020 13:29 27,354,152 8GadgetPackSetup.msi
13/10/2020 13:36 206,064
25/09/2020 12:53 4,902,896

Is there a way to import them into SQL and maintain the path, size and file name ?

If anyone has examples of this it would help me a lot as it very time consuming currently.

SQL Server
SQL Server
A family of Microsoft relational database management and analysis systems for e-commerce, line-of-business, and data warehousing solutions.
11,569 questions
0 comments No comments
{count} votes

1 additional answer

Sort by: Most helpful
  1. Eswar Koneti 2,111 Reputation points

    This is does not seem be to configMgr issue. This is more of SQL and you should look for SQL forum.

    what are you trying to achieve here using ConfigMgr?

    If your requirement is to get the file inventory etc, you can look for software inventory ( i know it is slow), or CM Pivot or configuration item for checking the specific file details.


    0 comments No comments