Tracking the Location of multiple files

Hi!
I previously intervened on a topic but perhaps I was in the wrong place. :confused: (here the link)
So I will resume my query in a new one.
I use the ActivityWatch to analize where my time goes by… And I think this it’s a wonderfull tool. especially tracking the time AFK.
But I find a limitation that I would like to get around. Maybe the solution already exists, but since I am a simple user, I cannot program it correctly. :woozy_face:
So, I try to find do that thing and I can’t write a Rule…
for example:
I want to watch the activity of the multiple files into a one folder…
D:\Users\USER\Documents\Client Name\Project
File nº1
File nº2

File nºX

So… I don’t want to make a multiple rules for all of these files…
I want see the activity of the all of files into a “Client Name” or “Project”
it is understood?
In a SQL editor i’ll find the activity i want track but not the complete path to write the Rule to Track the activity


here is the activity in the Raw Data

maybe I’m not clear enough, so I’ll try an example :thinking:
I have these files to work with
image
And when I want to view the time I spent working in the File nº1… Filenº2…
trying these sentece on the Category Builder I don’t find anything


I take this opportunity to greet you very cordially from Santa Fe, Argentina :hugs:. Thanking in advance this great group of people who dedicate their time to help others, even if only with a brief response. (also to Google Translate :stuck_out_tongue_winking_eye:)

I guess “Pattern” field is for RegExp (Python flavor) here. Therefore \U, \A (this for sure), \D, \C, \P has a specific meaning, not U, A, D, C, P letters.

Thank you very much for the attempt but it doesn’t help me solve my doubt. I don’t understand anything about Python and I let myself be helped by AI and users like you… I’ll keep waiting… Greetings

Ok, I see your question now, sorry that understood it in wrong way after the first reading.

I guess you are trying to create Rule which would add time interval into specific category when you worked with files from the specific folder.

  1. By your screenshots I see that events don’t contain the full path like D:\Users\USER\Documents\Client Name\Project - they contain only name of current folder in “explorer.exe”. Therefore making Rule for the whole path won’t work. I assume you have discovered it already (“find the activity i want track but not the complete path to write the Rule to Track the activity”) and your doubt is right - you need to work with the data depicted on your screenshots, there is nothing hidden and more detailed somewhere else. aw-watched-window is able to get only “title” from “explorer.exe” which contains only name of the current folder, not the whole path. Probably you may configure Explorer to show full path and aw-watched-window events will start to have this information.
  2. If return back to initial goal then probably the most time you are spending not in “explorer.exe” but in “Notepad” or other application which shows and allows to work with file content. In this case you need to write Rule which should match text on event like {"app": "notepad.exe", "title": "File nº1"} and in this case use pattern File nº\d+. OR use pattern D:\\Users\\USER\\Documents\\Client Name\\Project\\File nº\d+ if Notepad shows the whole path in window title and event looks like {"app": "notepad.exe", "title": "D:\Users\USER\Documents\Client Name\Project\File nº1"}.
  3. RegExp-s are quite complex thing and I would recommend to use services like https://regex101.com/ to check your options and ChatGPT/Bard/etc. to prepare examples (example of prompt "Write Python regexp to match where <changed_subtring> may look like a, b, c". https://regex101.com/ does a good job to explain RegExp-s and you may check ChatGPT/Bard/etc. answers in it:

First of all, thank you very much for taking the time to respond and trying to help me.

  1. That’s correct, “aw-watched-window is able to get only “title” from “explorer.exe” which contains only name of the current folder, not the whole path.”
  2. I may not have been clear about what I need.
    Therefore, I will try to exemplify in a better way. But I understand that it is a limitation of the ActivityWatcher application.

Suppose I receive from my client multiple files of different formats and different names to work with… none of the files contain anything in common in their name (that I could use to track). I open one after another and spend hours working on them, editing… The only thing in common between those files is the location of that folder… and that, precisely, does not save aw-watched-window.
image

Is there a way to track this activity without having to create a rule for each file? (it would be so boring)
As boring as my query thread.
Thank you so much

If you want to track “by folder from what file was opened” then I see 2 approaches:

  1. Make applications you working in to show full path to file and next make rules to match these pathsin these events. For example on my Ubuntu LibreOffice doesn’t show full path to the document by-default but with help of this post I was managed to get it


  2. Make at least explorer.exe show full path (this post promises that it is possible, I don’t have Windows to check) and next with separate (from ActivityWatch) application decide that all time spend from event “explorer.exe path1” to event “explorer.ext path2” should be counted/saved as “time spent in path1”. I’m doing something similar in https://github.com/AlexanderMakarov/activitywatch-ets but it is quite far from working version yet.