Skip to content

Commit

Permalink
script: get the name of the current folder
Browse files Browse the repository at this point in the history
  • Loading branch information
akosbalasko committed Jun 8, 2021
1 parent 1f11948 commit d723159
Showing 1 changed file with 16 additions and 0 deletions.
16 changes: 16 additions & 0 deletions scripts/current_folder.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@

title:: Gets the current folder
author:: Akos Balasko

----

```dataviewjs
console.log("this:", this);
let currentFolder = this.currentFilePath.split('/');
currentFolder.pop();
currentFolder = currentFolder.join('/');
console.log("currentfolder: "+ currentFolder)
```

0 comments on commit d723159

Please sign in to comment.