Copying File Using PHP

Tamamlanmış İlan edilme: Jan 6, 2006 Teslim sırasında ödenir
Tamamlanmış Teslim sırasında ödenir

Hi there

This should be a very simple project for someone who knows what they are doing with PHP scripts.

I would like a simple PHP script that sorts through the file names in a particular directory on my web-server and copies the most recent file (based on it's name) to a directory higher up the structure. The file names in the directory are all in the form:

[login to view URL]

[login to view URL]

[login to view URL]

..etc

...and are mysqldumps of a mySQL database in ASCII text.

The PHP script should have the directory in which the files are stored and the directory to which the file will be copied, coded as variables at the top of the script - as this script will be used to perform a similar task on more than one site. The script should not require any user input, as it will eventually run as a Cron task on a daily basis.

Warmest Regards

Paul

## Deliverables

Hi there

To give a bit of background: I have a large mySQL database that is backed up every day at varying times and is given a file name according to the date and time it was created.

These daily files are large (circa 400Mb) and unless I regularly delete old files, they accumulate over time and send me over the bandwidth I am allowed for my tape-based server backups - and then I get charged extra. So I am planning to exclude the directory where all the files are stored from my tape-backups and copy the most recent file higher up the directory structure (this is where you come in) so I always have a tape backup of the most recent file.

So, I would like a very simple PHP script that sorts through the file names in a particular directory on my web-server and copies the one most recent file (based on it's name) to a directory higher up the structure and gives the file a new file name. The relevant file names in the directory are all in the exact form:

[login to view URL]

[login to view URL]

[login to view URL]

..etc

i.e.:

[login to view URL]

MMM are months of the year and will all be 3 characters, i.e.: Jan, Feb, Mar, Apr, May, Jun, Jul, Aug, Sep, Nov, Dec.

All files are mysqldumps of the mySQL database in ASCII text. It is possible there may be other files in the directory that are not named in this format. These files should be ignored.

The PHP script should have the directory in which the files are stored, the directory to which the file will be copied and the new file name, coded as variables at the top of the script - as this script will be copied and edited to perform a similar task on more than one site. The new file name will usually already exist in the directory to which it is being copied and so it should overwrite the existing file.

The script should not require any user input, as it will eventually run as a Cron task on a daily basis.

It is important that the most recent file is found using the file name, rather than the datestamp on the file itself.

For compatibility: the server is running PHP v4.3.2-26, however access to this server for testing will not be available.

Warmest Regards

Paul

## Platform

PHP v4.3.2-26 compatible

Mühendislik Linux MySQL PHP Yazılım Mimarisi Yazılım Test Etme

Proje NO: #3195573

Proje hakkında

37 teklif Uzak proje Aktif Jan 9, 2006

Seçilen:

VSquash

See private message.

%selectedBids___i_period_sub_7% gün içinde 29.75%project_currencyDetails_sign_sub_9% %project_currencyDetails_code_sub_10%
(225 Değerlendirme)
7.3

Bu iş için 37 freelancer ortalamada $33 teklif veriyor

progwriter

See private message.

$80.75 USD in 5 gün içinde
(620 Değerlendirme)
7.7
javaoraclepro

See private message.

$59.5 USD in 5 gün içinde
(167 Değerlendirme)
7.5
zeurois

See private message.

$68 USD in 5 gün içinde
(57 Değerlendirme)
7.2
atandrau

See private message.

$17 USD in 5 gün içinde
(99 Değerlendirme)
6.5
corecpp

See private message.

$25.5 USD in 5 gün içinde
(89 Değerlendirme)
6.3
emberke

See private message.

$25.5 USD in 5 gün içinde
(132 Değerlendirme)
6.2
zubairuddin

See private message.

$25.5 USD in 5 gün içinde
(71 Değerlendirme)
6.5
silver82

See private message.

$29.75 USD in 5 gün içinde
(159 Değerlendirme)
6.2
codersarge

See private message.

$42.5 USD in 5 gün içinde
(38 Değerlendirme)
5.8
redcom

See private message.

$28.9 USD in 5 gün içinde
(167 Değerlendirme)
5.4
synbiant

See private message.

$42.5 USD in 5 gün içinde
(31 Değerlendirme)
5.0
mesh2005vw

See private message.

$4.25 USD in 5 gün içinde
(107 Değerlendirme)
5.1
davincisoftvw

See private message.

$21.25 USD in 5 gün içinde
(45 Değerlendirme)
4.6
normannormal

See private message.

$4.25 USD in 5 gün içinde
(75 Değerlendirme)
5.0
CodingCops

See private message.

$25.5 USD in 5 gün içinde
(47 Değerlendirme)
4.6
setjmp

See private message.

$21.25 USD in 5 gün içinde
(58 Değerlendirme)
5.1
resolutionsvw

See private message.

$17 USD in 5 gün içinde
(18 Değerlendirme)
3.9
josbosmans

See private message.

$15.3 USD in 5 gün içinde
(14 Değerlendirme)
3.6
vw1614561vw

See private message.

$29.75 USD in 5 gün içinde
(35 Değerlendirme)
3.6
scotsteam

See private message.

$25.5 USD in 5 gün içinde
(9 Değerlendirme)
3.3