Hello.
I was thinking to make a program that will turn off my computer X minutes after a download has finished (while I sleep).
The only problem is to make the program know that the download has finished, and I was thinking about turning off few minutes after the file gets to a particular size. I alredy tried programs that can perform this but they didnt work well. Getting the size of the file (not the exact size of course) will solve the problem.
I'll give you an example for calling a function that returns the file size to label:
Then we will see this on label caption (example):Code:Label1.Caption = GetFileSize("C:\Downloads\DownloadedFile.exe")
1,257,895,908 bytes
or 1.2GB, or 1200mb I dont mind.
Any ideas for a function or some code? Thanks.




Reply With Quote