Todd Beverly>
>It looks like there is another  command (CopyEx) ,
>which will take the FOF options.

Todd, thanks BIG! That was very helpful. I substituted
CopyEx for Copy, and he takes the constants. When I
share the remote directory and run my script, he
copies the file over nicely, and gives no popups.
Super!

============================================

Still having the same error capture problems tho.
When I un-share the remote directory, run the
script, here's what get's written to my log (I'm
particularly unnerved by the msg "The operation
completed successfully"):

[2006-10-04 04:53:08] Try to copy file testfile3.txt
[2006-10-04 04:53:08] FROM: data\testfile3.txt
[2006-10-04 04:53:08] TO: \\xx.xx.xx.xx\data\testfile3.txt
[2006-10-04 04:53:12] No eval error
[2006-10-04 04:53:12] return:
[2006-10-04 04:53:12] err_msg: The operation completed successfully.
[2006-10-04 04:53:12] No ^E error

Here are the relevant lines of code:

 eval {
  $return = CopyEx "$copy_from" => "$copy_to", FOF_NOERRORUI | FOF_SILENT;
  };

 if ( $@ ) {
   $logger->info("ERROR: $@");
   }
   else {
     $logger->info("No eval error");
     }

 $logger->info("return: $return");

 my $err_msg = Win32::FormatMessage(Win32::GetLastError());

 if ( $err_msg ) {
   $logger->info("err_msg: $err_msg");
   }
   else {
     $logger->info("No $err_msg");
     }

 if ( $^E ) {
   $logger->info("^E ERROR: $^E");
   }
   else {
     $logger->info("No ^E error");
     }

best,

 /dennis

------------------------------------------------
Phone: 317.298.6049
------------------------------------------------
If I'm not here, it means I've gone out to find myself. If I get back
before I return, please keep me here.


--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

This is a PRIVATE message. If you are not the intended recipient, please
delete without copying and kindly advise us by e-mail of the mistake in
delivery. NOTE: Regardless of content, this e-mail shall not operate to
bind CSC to any order or other contract unless pursuant to explicit written
agreement or government initiative expressly permitting the use of e-mail
for such purpose.
--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------


_______________________________________________
Perl-Win32-Users mailing list
Perl-Win32-Users@listserv.ActiveState.com
To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs

Reply via email to