rodin Posted June 22, 2006 Share Posted June 22, 2006 Hello All; Trying to figure out a code to do something that is probably simple, but I'm not able to find anything to combine to make it happen..Here is what i'd like to accomplish...Check all files in /home/radar/kabc*.png --- if those files are older than x hours, delete them. After deleting those files, I'd like to copy new "placefiles" in the place of the image, basically, copy test.png to kabc101.png (example filename). I'd like to not loop this process if the file size is equal to 123456 bytes exactly, and have the owner of those files a certain user. What this is, is a radar software that I use to upload to my personal website, so if there's no weather going on, I don't use the radar software, and it's not updating the radar on the web, so, after so many hours of the software not uploading anything new, i'd like to find a way to have these placefiles put in place. Once I start my software again, it'll overwrite those files automatically.Does this seem like it's possible? Is it an easy task? Anyone willing to help on this?Thanks bunches! Quote Link to comment https://forums.phpfreaks.com/topic/12600-delete-files-if-older-than-x-hours-copy-placefile/ Share on other sites More sharing options...
rodin Posted June 22, 2006 Author Share Posted June 22, 2006 [!--quoteo(post=386673:date=Jun 21 2006, 06:58 PM:name=rodin)--][div class=\'quotetop\']QUOTE(rodin @ Jun 21 2006, 06:58 PM) [snapback]386673[/snapback][/div][div class=\'quotemain\'][!--quotec--]Hello All; Trying to figure out a code to do something that is probably simple, but I'm not able to find anything to combine to make it happen..Here is what i'd like to accomplish...Check all files in /home/radar/kabc*.png --- if those files are older than x hours, delete them. After deleting those files, I'd like to copy new "placefiles" in the place of the image, basically, copy test.png to kabc101.png (example filename). I'd like to not loop this process if the file size is equal to 123456 bytes exactly, and have the owner of those files a certain user. What this is, is a radar software that I use to upload to my personal website, so if there's no weather going on, I don't use the radar software, and it's not updating the radar on the web, so, after so many hours of the software not uploading anything new, i'd like to find a way to have these placefiles put in place. Once I start my software again, it'll overwrite those files automatically.Does this seem like it's possible? Is it an easy task? Anyone willing to help on this?Thanks bunches![/quote]No thoughts on this? is it even possible? Thanks! Quote Link to comment https://forums.phpfreaks.com/topic/12600-delete-files-if-older-than-x-hours-copy-placefile/#findComment-48631 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.