homepage Welcome to WebmasterWorld Guest from 54.204.73.126
register, free tools, login, search, pro membership, help, library, announcements, recent posts, open posts,
Become a Pro Member
Home / Forums Index / Code, Content, and Presentation / Perl Server Side CGI Scripting
Forum Library, Charter, Moderators: coopster & jatar k & phranque

Perl Server Side CGI Scripting Forum

    
To delete a file once a week?
stcrim

WebmasterWorld Senior Member 10+ Year Member



 
Msg#: 3154 posted 1:07 am on Jul 25, 2003 (gmt 0)

If the following deletes all the files in a folder, is there an easy way to delete a single file from a folder once a week?

-s-

#!/usr/bin/perl
$path="/www/mysite/ad";
opendir(FP,"$path");
@del=readdir(FP);
closedir(FP);
foreach $i (@del) {
unlink "$path/$i";
}

 

jatar_k

WebmasterWorld Administrator jatar_k us a WebmasterWorld Top Contributor of All Time 10+ Year Member



 
Msg#: 3154 posted 1:56 am on Jul 25, 2003 (gmt 0)

you could set it up as a crontab

G search brings up a bunch of docs, couldn't decide on one suitable to post.

<added>just realized you may mean the code
Does it have a set name?

rcjordan

WebmasterWorld Senior Member rcjordan us a WebmasterWorld Top Contributor of All Time 10+ Year Member



 
Msg#: 3154 posted 2:04 am on Jul 25, 2003 (gmt 0)

wonder if there is anything to cannibalize out of this thread?

[webmasterworld.com...]

StopSpam

10+ Year Member



 
Msg#: 3154 posted 2:11 pm on Jul 25, 2003 (gmt 0)

Yeh we just had discussed this question
as i earlyer this month had asked nearly same question and and solution ...

Global Options:
 top home search open messages active posts  
 

Home / Forums Index / Code, Content, and Presentation / Perl Server Side CGI Scripting
rss feed

All trademarks and copyrights held by respective owners. Member comments are owned by the poster.
Home ¦ Free Tools ¦ Terms of Service ¦ Privacy Policy ¦ Report Problem ¦ About ¦ Library ¦ Newsletter
WebmasterWorld is a Developer Shed Community owned by Jim Boykin.
© Webmaster World 1996-2014 all rights reserved