Here is a solution using xp_cmdshell to run powershell that returns xml which can be parsed because why not.
set nocount on;
declare @path varchar(1000), @cmd varchar(2000);
-- File path
set @path = 'c:\temp';
-- Powershell command to get a directory listing and output in to its clixml for parsing
set @cmd = 'powershell.exe -noprofile -outputformat xml -command "get-childitem -path ''' + @path + ''' -File"';
-- output table for xp_cmdshell
create table #cmdOutput ( [output] varchar(max));
-- run powershell command and collect output
insert into #cmdOutput ( output ) exec sys.xp_cmdshell @cmd;
-- remove some values for paring xml, agg to a single string, cast as xml
with cte as ( select cast(string_agg(
iif(a.output like '%xmlns%', replace(a.output, 'xmlns="http://schemas.microsoft.com/powershell/2004/04"', ''), a.output), ''
) as xml) myDoc from #cmdOutput a where a.output <> '#< CLIXML'
)
-- select data out of xml
select b.fileObj.value('(./Props/S)[1]', 'varchar(1000)') [Name]
, b.fileObj.value('(./Props/I64)[1]', 'bigint') [Length]
, b.fileObj.value('(./Props/S)[2]', 'varchar(1000)') DirectoryName
, b.fileObj.value('(./Props/B)[1]', 'bit') IsReadOnly
, b.fileObj.value('(./Props/B)[2]', 'bit') [Exists]
, b.fileObj.value('(./Props/S)[3]', 'varchar(1000)') FullName
, b.fileObj.value('(./Props/S)[4]', 'varchar(1000)') Extension
, b.fileObj.value('(./Props/DT)[1]', 'datetime2') CreationTime
, b.fileObj.value('(./Props/DT)[3]', 'datetime2') LastAccessTime
, b.fileObj.value('(./Props/DT)[5]', 'datetime2') LastWriteTime
from cte a
cross apply a.myDoc.nodes('/Objs/Obj') as b(fileObj)
where b.fileObj.value('(./Props/S)[1]', 'varchar(1000)') is not null
-- clean it up
drop table #cmdOutput;