Dataview: Querying for uncreated files

I’m trying to create a dataview query that lists all uncreated files but haven’t found a solution yet. They are being found in queries for file.outlinks but I couldn’t find a way to filter for only showing me uncreated files.

Any ideas?

1 Like

Using a simple DQL query (without a djs query), you can try this:

TABLE out AS "Uncreated files"
FLATTEN file.outlinks as out
WHERE !(out.file) AND !contains(meta(out).path, ".")
SORT file.name ASC

The query uses the file.outlinks and exclude cases as images… (that are considered as file.outlinks but don’t have inherit attributes as file).

1 Like

Works great!

Thx a lot :slight_smile:

I’ve worked a bit on the query and came up with this

TABLE without id 
out AS "Uncreated files"
FLATTEN file.outlinks as out
WHERE !(out.file) AND !contains(meta(out).path, "/")
GROUP by out
SORT out ASC

This way only uncreated files are being shown and there are no multiple entries if multiple files link to the uncreated file and file names with “.” in the name won’t be filtered out.

and here’s another table query that sorts by uncreated file and also lists the files where the links to the uncreated file originate from.

TABLE without id 
out AS "Uncreated files", file.link as "Origin"
FLATTEN file.outlinks as out
WHERE !(out.file) AND !contains(meta(out).path, "/")
SORT out ASC
1 Like

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