How can I make this a table?

I’m trying to see all the pdfs in a folder but the code I have shows it as a list and my idea is to see it as a table



dataviewjs
const pdfFiles = app.vault.getFiles().filter(file => file.extension === 'pdf' && file.path.includes('MyFolder')); dv.list(pdfFiles.map(file => dv.fileLink(file.path)))

Replace the dv.list with dv.table(), so something like this (I had to change to .js since I don’t have pdf files in my test vault :smiley: ):

```dataviewjs
const files = app.vault.getFiles()
  .filter(file => file.extension === 'js');

dv.table(["File name", "size"],
  files.map(file =>
    [ dv.fileLink(file.path),
      file.stat.size ] ))
```

And I just added the size to get a second column, and this gave me this output:
image

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.