TASdvlper has asked for the wisdom of the Perl Monks concerning the following question:

All,

I've been presented with writing a tool, that will run as a Perl cgi script, and be able to copy files (of any typetext,bin,etc) from any remote system, rename and cleanup the files on the remote system.

I've been poking around various sites and have fun quite a samples that I can download, but I haven't really seen many demos yet. I also know CPAN has some upload modules, I just can't seem to figure which one best fits my needs

From what I've gathered some sites actually read the entire contents of the file into the form and pass it to the cgi script, but this probably will be no good for binaries (??). Other scripts seems to use the ftp module.

So, from my browser (mostly likely running on Windows) I want to be able to "browse" any local or mounted drive, and select one or files and have them moved to my Linux server. The script will have a "known" string that it will append to the end of each file name, as part of the renaming. As for the cleanup, I'm guessing I could use something like telnet or expect modules ?

If at all possible, I would like to create something fairly lightweight (one can only hope ...)

So, does any one have any suggestions and/or experience on the above ?

Thanks all,

Replies are listed 'Best First'.
•Re: File Manipulation and Uploading
by merlyn (Sage) on Jan 13, 2004 at 16:10 UTC
Re: File Manipulation and Uploading
by waswas-fng (Curate) on Jan 13, 2004 at 16:11 UTC
    You have multiple different problems. First you must be able to describe the outcome you are looking for. Your end product description is all over the place. After you get the requirements down, you will want to decide on protocol(s) for the backend of your script. If the server is running on windows and connecting to windows shares take a look at the Win32 modules -- they can enable you to map shares on windows. If the remote servers will be running ftp take a look at Net::Ftp, need encrypted file transfers? Try one of the sftp modules. After you determine how you will access the data you can start to visualize abstracting the access methods and presentation methods for your app. I really don't get a clear picture of what you want your app to do though.


    -Waswas