For Programmers: Free Programming Magazines  


Home > Archive > PHP Language > March 2006 > Clean up FTP site via PHP?









You are viewing an archived Text-only version of the thread. To view this thread in it's original format and/or if you want to reply to this thread please [click here]

 

Author Clean up FTP site via PHP?
Noozer

2006-03-24, 3:59 am

I'm a complete PHP newbie, but I have need of a PHP script...

What I need the scrip to do is the following:

- Log into an FTP server
- Go to a specific directory
- Check all folders in that directory for the following
- If "aFile." is more than a month old, output it to the browser (aFile
with no extension)
- If "aFile.?*" exists and is more than a w old, delete it. (aFile with
any extension, but not a blank extension)
- If any other file exists besides "aFile." or "aFile.*" exists, output it
to the browser.


....that's it.

Can this be done in PHP? If so, how?

Thanks!!! It's appreciated!!!


Noozer

2006-03-24, 7:57 am


"Noozer" <dont.spam@me.here> wrote in message
news:X3MUf.176735$H%4.4745@pd7tw2no...
> I'm a complete PHP newbie, but I have need of a PHP script...
>
> What I need the scrip to do is the following:
>
> - Log into an FTP server
> - Go to a specific directory
> - Check all folders in that directory for the following
> - If "aFile." is more than a month old, output it to the browser (aFile
> with no extension)
> - If "aFile.?*" exists and is more than a w old, delete it. (aFile
> with any extension, but not a blank extension)
> - If any other file exists besides "aFile." or "aFile.*" exists, output
> it to the browser.


> Can this be done in PHP? If so, how?


Figured it out! My first working PHP script!

: )


Sponsored Links







Also available: Server administration forum archive | Web Design forum archive | Software forum archive | Hardware reviews archive

Copyright 2009 codecomments.com