I am still new to programming and hoping someone can point me in the best direction.
I am creating a script that monitors a directory and creates a zip file and then mails the archive. I have successfully monitored the dir and can zip the files. I am somewhat lost on what the best approach would be to assure the archive is 3MB or less. I was thinking check file size of x files and then create the zip file. Once the zip was created check the size and if needed remove files.
Something tells me I am thinking to complicated and a better way is out there. I have checked google but didn't come across anything other than check the size of the zip.
I should mention files may be dropped in the directory by the hundreds.
I will apologize in advance if I missed something in my searchers or it is obvious.
Edited by crag0