Answer the question
In order to leave comments, you need to log in
How to catch the moment a folder is opened?
You need to catch the moment when the user opens a certain folder, how to do it using python on a windows system
. Example:
The user went to the "C:\Documents and Settings\Admin" directory and the program should fix it somehow and take certain actions.
Answer the question
In order to leave comments, you need to log in
everything turns out to be much easier
import os.path
import time
path=("C:\******")
a=os.path.getatime(path)
while True:
time.sleep(1)
print([time.ctime(x)for x in[a]])
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question