in reply to Moving Files in Perl

I got lost in your explanation, so I'm not sure what you are doing or why you are doing it or how WS_FTP has anything to do with this.

To get modification (or creation) times, look at the stat() function. To rename a file, you can use the built-in rename() function, or File::Copy. To deal with Zip archives, you can look at Archive::Zip.

If you get stuck on one of the steps, ask just about that step and tell us what you did. We can probably provide better help that way.

--
brian d foy <bdfoy@cpan.org>

Replies are listed 'Best First'.
Re^2: Moving Files in Perl
by Anonymous Monk on Jan 31, 2005 at 17:01 UTC
    Brian, Let me clarify my process. My office is the hub that process data from school districts. A school district uploads its file using WS_FTP to my server on their specific location. For example if the school district Fox sends me a form the zip their file log on to WS_FTP and upload their file to the directory Districts, then to their Directory Fox, then to their folder Inbasket. It is on this file that I want to run my Perl script. I want to at 11:00 p.m. each evening run this script on this folder to see if the system date matches the date it was uploaded on WS_FTP. If it was I then have to look into an array that stores passwords. I then obtain the correct password for that district and unzip the file. The files are zipped with a password protection. That file has now been successfully unzipped and now I need to re-zip that file without a password to the archive folder, which is located in the same directory as the Inbasket, and re-name the file to include the suffix _IN on what I call the fifth node of the name. Then the process is done for that district. I have a few districts therefore the use of the if-else chains will be needed to loop through and make sure all files are done. Thank you for your help and I hope this can help to clarify my need. Any information you can give I would appreciate it. JRC1982 <JRC1982@aol.com>