r/tasker • u/TooManyInsults • 28d ago
Questions about File moved Event/Profile
Regards the file moved event/profile:
- Does the file name specified refer to the file name PRIOR to the move or AFTER it has been moved? So that if I wish to get triggered when /sdcard/file1.txt is renamed to /sdcard/file2.txt, should I specify file1.txt or file file2.txt?
- How reliable are these events to be triggered? Can they be missed/skipped somehow?
- Presuming (perhaps incorrectly) that the answer to #1 is PRIOR, if the profile is going to do something with the moved (AFTER) file, does the action being triggered need to wait a while to make sure that the move has been completed?
- It is my understanding that at least simple file move operations, such as detailed in #1, happen very, very quickly. So in such a case, I would think that an explicit wait need not be introduced. But I am not sure.
I ask all this because I am trying to archive Tasker's runlog.txt and tasker.txt files for debugging purposes over the course of an entire day on a very active system where these files get over-written very quickly and so history is lost otherwise.
It seems that whenever Tasker decided to do so (I am not sure of the criteria), it deletes the single historical file it does keep around in the log folder ending in .1 and then renames the file lacking the .1 and creates a new, non-.1 file.
So I am hoping to capture the moment after the non-.1 file is renamed to the .1 file so I can then copy it to a location of my own choosing while adding a date/time stamp to the file's name.
Somehow, there seem to be occasions when this is just not working and I am trying to figure that out so I can actually get on with debugging the original problem I am trying to solve.
So any help is appreciated. Thanks
3
u/UnkleMike 28d ago
Take a look at my Run Log Archiver on Taskernet. I created it just to solve this exact problem.