View Single Post
Old 11-14-2012, 08:15 AM   PM User | #2
firepages
Super Moderator


 
Join Date: May 2002
Location: Perth Australia
Posts: 3,943
Thanks: 7
Thanked 82 Times in 81 Posts
firepages will become famous soon enough
you could set a cron job to do that for you, PHP might be something like ...

cron /usr/bin/php -q /path/to/script.php
PHP Code:
<?php
$src_folder
='/home/blah/webcam';
$dest_folder='/home/blah/webcam/history';
$arr=array('a','b','c','d');
foreach(
$arr as $a){
 if(
file_exists("$src_folder/{$a}.jpg")){
    
rename("$src_folder/{$a}.jpg","$dest_folder/{$a}_".date('ymdhis').".jpg");
 }
}
?>
you could do the same with bash on linux of course rather than calling php, whichever you are more comfortable with
__________________
resistance is...

MVC is the current buzz in web application architectures. It comes from event-driven desktop application design and doesn't fit into web application design very well. But luckily nobody really knows what MVC means, so we can call our presentation layer separation mechanism MVC and move on. (Rasmus Lerdorf)

Last edited by firepages; 11-14-2012 at 08:18 AM..
firepages is offline   Reply With Quote