thanks jarich
for the great and very competent support,
but I wrote my problems not so clearly.
the info file looks :
----------------------
AB00001 N120001
BB00002 N200023
----------------------
with info file I should get many times a day
also 2 files: AB00001 and BB00002
all files are TEXT files.
left above is the name of the first file and at the bottom left hand corner the name of the second file.
script should check if the files are complete
and names on info file matches to the names of this 2 files.
only if complete, rename first file to N120001
transfer,
wait for 20 minutes, rename the second to N200023 and transfer to the different directory then the first one.
the name of the info file never changed, but names of these 2 files and names on the info file change all the time.
on info file I don't get any paths to change directory
on the ftp server.
these paths are fixed:
already renamed first file N120001 should be transfered to:
$ftp->cwd("FTP/A1");
and second file N200023 to:
$ftp->cwd("FTP/B2");
this is, I think my biggest problem at the moment.
when the transfer completed should create
a new subdirectory with date and time, something like: 200402241200
and put (backup) all files there, otherwise files will be overwritten each time.
this script will be scheduled every 5 minutes from cron job and waits for the files.
there are very important things:
the second file cannot be transfered without the first one
the second file must be transfered after 20 minutes after
the first transfer.
these files cannot be transfered twice and should be there.
and I would like use your script, that you already posted.
if you have time to help by this script, I 'll be very happy
I know, it's a lot of changes, but I want to explain,
what should do this script on the end.
kind regards
cc
Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
Read Where should I post X? if you're not absolutely sure you're posting in the right place.
Please read these before you post! —
Posts may use any of the Perl Monks Approved HTML tags:
- a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
| |
For: |
|
Use: |
| & | | & |
| < | | < |
| > | | > |
| [ | | [ |
| ] | | ] |
Link using PerlMonks shortcuts! What shortcuts can I use for linking?
See Writeup Formatting Tips and other pages linked from there for more info.