Preface
A very important friend sent me a photo the other day, but I was withdrawn before I could check it.
At that moment I really wanted to find it out. How can I have a way to see it, but what?
You can't ask her.
Just when I was a man on both sides (coughing~) it was a dilemma, and I suddenly recalled the anti-retraction law I saw a long time ago.
Pick up an article to see that the pictures mentioned above that WeChat recalls will be recorded locally and stored in C:\Users\Administrator\Documents\WeChat Files\.
When Miss Sister said she would do it, she immediately copied the path and searched for it, but she was proud of it:
Hey hey, kid, do you think this sister won't be able to see you if you take it back?
Next second:
The results of the search were quite dazzling.
What is this?
Miss Sister said she was confused.
Then I thought, was it hidden? (Miss Sister has experienced this kind of file search)
It's really possible!
Opened the hidden project settings, suddenly popped out some files that just didn't exist, thinking: Ha-ha, you can catch this now.
Immediately!
Just follow the path, but...
Wrong report, not found.
Ah this!
It's up to my sister
/Angry/
What?
Do you think that's what your sister gave up?
Heh, the pattern is small.
Is Miss Sister the kind of person who gives up easily?
After Retrofitting in 981, Miss Sister finally found the problem: the previous C:\Users\AdministratorDocumentsWeChat Files\path was wrong. Actually, it can't be said that's right. After all, part of it is like this, but Miss Sister's letter was downloaded in Microsoft Store. The default path is different. It should be:
C:\Users\Your User Name\AppData\Local\Packages\TencentWeChatLimited.forWindows10_sdtnhv12zgd7a\LocalCache\Roaming\Tencent\WeChatAppStore\WeChatAppStore Files
After testing, we can find the Weixin storage file of Miss Sister's mind and beliefs.
/Congratulations/
What? Do you think this is the end of the article?
Error, Great Error!
If you think about the above routes, let alone find them yourself, you will never see how people can do things. It is impossible for everyone to spend half a day looking up materials like Miss and Sister. This is too inefficient.
No, I have to change this!!!
I had to "overdress Li Bai" when I took it out decisively
Cough~
Is python..
1. Guide Pack
import os # Involving file operations import datetime import re # Involving regular expressions
2. Establishing a lookup function
def searchFiles(): file = 0 fold = 0 global con con = 0 global con1 con1 = 1 con2 = 1 name = input("Please enter the name of the file or folder you want to find:") start = input("Please enter a starting point for finding:") rec = re.compile('C|c') # Determine whether user action is C disk rel = rec.match(start) if rel: # Warn when operating c disk print("!!warning!!") print("System files may be involved, handle with care!!!") con = 1 if con: con1 = int(input("Would you like to continue? Please choose carefully! \n 1/0?\n")) if con2 and con1: # Determine whether to continue the search start_time = datetime.datetime.now() print(start_time) for r, ds, fs in os.walk(start): for f in fs: fn = os.path.join(r, f) if f == name: print("Find File Path:\n%s\n" % os.path.abspath(fn)) file = 1 for d in ds: dn = os.path.join(r, d) if d == name: print("Find Folder:\n%s\n" % os.path.abspath(dn)) fold = 1 if file == 0: print("\n The file was not found. file=0") if fold == 0: print("Folder not found,fold=0") end_time = datetime.datetime.now() sec = end_time - start_time print("\n Time-consuming program execution:%s" % sec) print("Program Run%s second:" % sec.seconds)
3. Principal Functions
def main(): t = 1 while (t): searchFiles() t = int(input("Do you want to continue your search:1/0:\n"))
4. Code Testing
if __name__ == "__main__": try: main() print("Find End!") except ValueError: print("Program ends without specification input!")
Hey hey, back to our original goal: finding the Tencent folder
Is it convenient to find the target file in just a few seconds?
V. Summary
1. This article mainly solves two problems:
1. Where are the WeChat files stored?
2. How to quickly find files with file names and their paths
2. Instructions for Code Use
This code mainly implements the function: Enter the file name, and the starting point to start the search, fast search.
Finding the starting point (path) closer to the target file takes less time. Of course, if you really don't know where the file is, you can type C:/or D:/directly. Miss has tested it several times and it won't take more than a minute (unless you don't know why).
3. Later vision
1. This code sets the time of clock calculation and lookup. In order to protect the security of C-disk files, regular expressions are also used to limit the reminder. In addition, Miss thinks there is a small function that should be implemented (but Miss is too late), but would your partner like to challenge it?
Just when it's homework, please leave a comment in the comments area. Hey, refer to the answer in the next issue.
To achieve small functions: Every time you need to select where you want, add a countdown, if the user does not enter within 10 seconds, exit the program by default; If the user enters within 10 seconds of the countdown, the countdown terminates and the lookup program begins. (Don't underestimate this feature; it's useful for the performance of the whole program.)
2. Many little partners can't bear to see this, so what about checking the recall records?
Now I just found the file and it's still encrypted, which... that's not right!!!
Hey hey, don't worry. It's 2 am now. Let's get your sister to sleep. We'll see you next time.