in reply to Check if "System" was succesful

to get the return value of a  system command, just do:  my $returnValue = system(...); and determine if the code is what you want/expect.

Of course, in your specific example, why don't you just do a DOS  MOVE instead of a  COPY &  unlink ? Again, you can capture the return codes from each move to put into a hash to know the number of files successfully and unsuccessfully moved (I'm assuming that's what you're using the  $i++ for.

- - arden.