Moving file to a new location once tasks are completed

What im trying to do

What i usually do is create tasks in new files. However, this is has made a mess in my tasks folder where all of the my tasks are stored. What I’m trying to do is get the files whose tasks are complete to a new location so that my tasks folder is clutter free and i can focus more properly on what is more important

Things I have tried

Ive tried using the archiver plugin but i haven’t been able to automate the process, so i have to manually open the note and archive all the completed tasks in it

How do you mark the tasks as done without opening them?

I add tasks to separate notes and use Dataview to make these tasks visible in my daily notes. I got a code snippet from this article which worked perfectly for me.

dataviewjs  
dv.header(1, 'to - do');  
dv.taskList(dv.pages('#task').file.tasks  
.where(t => !t.completed));  

I’m not sure I understand your setup. I thought at first that you had a folder of notes which each contain 1 tasks, but then you mention archiving all the tasks in a note. And I don’t know what your are using Task Archiver for because it sounds to me like it doesn’t move files?

If you can find a way to move files based on a search or a list of links, you can identify all the notes which contain completed tasks and no uncompleted tasks with this search (where Task folder is the name of your folder of tasks): path:"Task folder" "- [x]" -"- [ ]". At the least, you could work your way thru the list manually moving the files.

There is an Auto Note Mover plugin, but it only accepts tags and note titles as triggers. I suppose you could set Task Archiver to use a heading that includes a tag, and use the tag to trigger Auto Note Mover.

Outside of Obsidian you could use a shell script to find and move the files.

1 Like

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