A
A
asgasopgJA2021-08-07 11:11:43
Windows
asgasopgJA, 2021-08-07 11:11:43

How to get latest opened files in python program?

I want to write a python program that, after opening it, will have to copy the last 5 open files and copy them to a folder on the desktop, that is, make backups. How can I get these files? If you open Explorer and go to the quick access section, then the last 5 files will be what we need. But how to get them from the quick access tab? It is essentially not a folder and does not store files, but simply indicates their location.

Answer the question

In order to leave comments, you need to log in

2 answer(s)
J
javedimka, 2021-08-07
@javedimka

Quick access takes the latest files from here:
%AppData%\Microsoft\Windows\Recent\

H
Hemul GM, 2021-08-07
@HemulGM

It is essentially not a folder and does not store files, but simply indicates their location.

How would it store ... in the form of labels
C:\Users\%user%\AppData\Roaming\Microsoft\Windows\Recent

Where is your curiosity? Have you tried to find and do something yourself? Can you write a library for python, and you just import it and call execute?

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question