[Okta Webinar] Learn how to a build a cloud-first strategyRegister Now

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 519
  • Last Modified:

Read and record file names...

I have one table called: tMyFiles

SELECT fileName, filePath, createdOn, fileSizeKbyte, FROM tMyFiles;

I want a procedure to read fileName, filePath, createdOn, fileSizeKbyte of each file.

Starting from root directory, it enters all file names but keeps the folder names in a two dimensional array.

Why two dimentsionl array: The first level folders (folders in the root directory) are recorded as:

MyFolder(1, 1)="C:\Budget"
MyFolder(1, 2)="C:\Vacation"
MyFolder(1, 3)="C:\School"

After the root directory files are audited, then attention is shifted to MyFolder(1, 1) or "C:\Budget" and after recording the files in this folder, all folders in MyFolder(1, 1) is recorded as:

MyFolder(2, 1)="C:\Budget\Food"
MyFolder(2, 2)="C:\Budget\Entertainmnet"

and so fort until all.

I do not expect all to be done via this question. Having some workable solution/ progress will be fine.

Thank you.
0
Mike Eghtebas
Asked:
Mike Eghtebas
1 Solution
 
Rey Obrero (Capricorn1)Commented:
start by using the codes from this link

List files recursively
http://allenbrowne.com/ser-59.html
0
 
Mike EghtebasDatabase and Application DeveloperAuthor Commented:
Thank you.
0

Featured Post

NEW Veeam Agent for Microsoft Windows

Backup and recover physical and cloud-based servers and workstations, as well as endpoint devices that belong to remote users. Avoid downtime and data loss quickly and easily for Windows-based physical or public cloud-based workloads!

Tackle projects and never again get stuck behind a technical roadblock.
Join Now