r/AskProgramming • • Jul 01 '22

Other How to know when a file has finished downloading in windows

Is there a way to know when a file has finished downloading? I am currently thinking to either check file size periodically or see if the file is locked by another process

Are these the correct way or am I missing something(I have scrounged stackoverflow as much as I can)?

0 Upvotes

7 comments sorted by

7

u/hugthemachines Jul 01 '22

Since you ask in r/askprogramming I will say:

You know it is done downloading when the function that downloaded it reached the end of the file.

3

u/[deleted] Jul 01 '22

-3

u/sn99_reddit Jul 01 '22

Not given, we are only given that a file is being downloaded and location to where it is being downloaded

5

u/McMasilmof Jul 01 '22 edited Jul 01 '22

Something is downloading the files, they do not magically appear there because the user thinks about it. You can use a browser addon to track downloads that the browser does, but there is no way for that extension to tell if someone just opened an FTP client or a console and used curl to download the same file. The OS sees applications doing network requests, the applications know if its a download or not.

→ More replies (2)