Import existing directory listing into SQL

Mafiatone 96 Reputation points
2021-02-15T11:39:01.587+00:00

Hi,
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 1usmus-ryzen-power-plan-1.1.zip
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 All_CPU_Meter.zip
25/09/2020 12:53 4,902,896 Battle.net-Setup.exe

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.
13,799 questions
0 comments No comments
{count} votes

Accepted answer
  1. Mafiatone 96 Reputation points
    2021-02-15T13:00:20.737+00:00

    Sorry wrong section

    0 comments No comments

1 additional answer

Sort by: Most helpful
  1. Eswar Koneti 2,201 Reputation points
    2021-02-15T12:53:01.63+00:00

    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.

    Thanks,
    Eswar

    0 comments No comments

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.