0

I have a folder that is consistently Syncing the files, and I Must Manually Refresh (Right Click> Refresh) the folder to See Changed Contents.

So, I need to refresh a folder in a loop every 10 minutes.

Folder Path to Refresh

C:/Users/Student/My Dropbox/New Folder/15-2

Example

from aModule import refreshdir      # Fake
refreshdir("C:/Users/Student/My Dropbox/New Folder/15-2")

How can I do this in python?

Varun
  • 65
  • 2
  • 8
  • Read the directory, keeping all its children data, and at each read compare the result with the previous one. – CristiFati Oct 19 '21 at 05:59
  • @CristiFati How? What module should be used? – Varun Oct 19 '21 at 06:03
  • I have seen the symptoms you mention. I suspect the files _are_ there, but this is explorer specific issue. If you wait long enough explorer will refresh and display changes eventually. If you create a script to refresh, it will simply be a `ls "C:/Users/Student/My Dropbox/New Folder/15-2"` each execution will ONLY show the most current files to the script, it will not update the exporer process that you are looking at. – Egidijus Oct 19 '21 at 06:03
  • https://stackoverflow.com/questions/3207219/how-do-i-list-all-files-of-a-directory/48393588#48393588 – CristiFati Oct 19 '21 at 06:05
  • @Egidijus I am recording a live video, and the video file format is TS, the actual output video file size keeps increasing but explorer does not show the changes in file size until I refresh. – Varun Oct 19 '21 at 06:11

0 Answers0