jyancey241
asked on
Help Returning File Attribute Values From SELECT Statement
This example over simplies the situation that I have but allows me to ask the question clearly without giving tons and tons of details.
I have an application that copies files to a folder structure and creates a record in a table pointing to said file. I'd like to write a SELECT statement that allows me to confirm that the number of records matches the number of files in the folder.
Is there a SQL function that will return the count of files in a folder?
In my xBase (FoxPro/Clipper) days the functions where there. I would have accomplished this with the following:
SELECT LEN(ADIR(drive:\folder)) AS 'File Count'
ADIR was a funtion that poputated several attributes (name, ext, size, date, etc...) of each file into an array. Going for the length of the array gives the number of files in the array/dir.
Anything similar in SQL?
Thanks!!
I have an application that copies files to a folder structure and creates a record in a table pointing to said file. I'd like to write a SELECT statement that allows me to confirm that the number of records matches the number of files in the folder.
Is there a SQL function that will return the count of files in a folder?
In my xBase (FoxPro/Clipper) days the functions where there. I would have accomplished this with the following:
SELECT LEN(ADIR(drive:\folder)) AS 'File Count'
ADIR was a funtion that poputated several attributes (name, ext, size, date, etc...) of each file into an array. Going for the length of the array gives the number of files in the array/dir.
Anything similar in SQL?
Thanks!!
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER