Here is the query
DECLARE @Tbl AS TABLE (Details VARCHAR(MAX))
DECLARE @FilePath AS VARCHAR(100) = '\\NWDrive\FolderName\'
DECLARE @Cmd AS VARCHAR(100) = 'DIR ' + @FilePath
INSERT INTO @Tbl
exec master..xp_cmdshell @Cmd
SELECT Details,LEFT(Details,20) LastModifiedOn
FROM @Tbl