V
V
Vano2021-09-20 18:14:38
Python
Vano, 2021-09-20 18:14:38

Is it possible to track whether a person went to a certain folder?

Let's say I have a "project" folder and I would like to know if someone visits this folder. Is it possible to track this with python? I will accept any ideas, even the most crazy and difficult to implement

Answer the question

In order to leave comments, you need to log in

1 answer(s)
R
rPman, 2021-09-20
@Sovunya

The concept of entering a folder is vague, I haven’t asked about the OS yet, but there are a lot of applications that allow you to 'climb folders
' key in the registry, it is recommended to disable it so that the system does not waste disk resources on this, it is enabled by default)

[HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\FileSystem] value name NtfsDisableLastAccessUpdate to DWORD value 0 or 1

i.e. from python, you can periodically poll the time of the last access to the directory and react when it changes.
os.path.getatime(path)

This time changes to any access to the file or directory, including for example searching or indexing

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question