> I want to use the following pm's to copy files.
> 
> (CODE SNIPPIT)
> 
> use File::Copy;
> use File::Find;
> use File::Path;
> 
> my $MYPATH = $ENV {'WORKBENCH_HOME'};
> my $MYPATH2 = $ENV {'ESEC_HOME'};
> 
> $newAgentName = &promptUser("Enter the New Agent Name which you want to
upgrade to 5.0 ");
> $mainParParameter = &promptUser("Enter the Parameter Name used in main.par
( Second Section )");
> $targetDirectory  = &promptUser("Enter the target directory ",
"$perl_path\\$newAgentName");
> 
> Now I want to use cp command from File::Copy to copy fileA to
> $targetDirectory

Kamal,

File::Find is a great module, but you didn't provide any insight into what
you wanted to do with it.  To answer you explicit question, and one implied
question:

    mkpath( $targetDirectory );
    cp( $fileA, $targetDirectory );

Note1: Change "use File::Copy;" to "use File::Copy cp;".
Note2: I assumed that "fileA" referred to a variable called $fileA.

Chris


LEGAL NOTICE
Unless expressly stated otherwise, this message is confidential and may be privileged. 
It is intended for the addressee(s) only. Access to this E-mail by anyone else is 
unauthorized. If you are not an addressee, any disclosure or copying of the contents 
of this E-mail or any action taken (or not taken) in reliance on it is unauthorized 
and may be unlawful. If you are not an addressee, please inform the sender immediately.
_______________________________________________
ActivePerl mailing list
[EMAIL PROTECTED]
To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs

Reply via email to