> Thanks. I use File::Copy but I did not find anything
> that duplicates the Move (Copy\Delete) functionality.
>From the File::Copy docs:
If possible, move() will simply rename the file. Otherwise,
it copies the file to the new location and deletes the original.
--
Mark Thomas
Thanks. I use File::Copy but I did not find anything
that duplicates the Move (Copy\Delete) functionality.
I could just do a system 'rm ', but I was looking
for something a little cleaner.
To delete, you might try unlink:
perldoc -f unlink
to copy or move (rename) you could use File::Copy:
#!
nt: 1/29/01 10:52 AM
Subject: RE: [Perl-unix-users] File Copy and Move on Unix (Solaris)
>I have a script which I need to port from NT to Unix
>(Solaris). I used the Win32API::File module functions
>MoveFileEx and CopyFile to Move and Copy files (Move
>does a copy src->dest, delete
>I have a script which I need to port from NT to Unix
>(Solaris). I used the Win32API::File module functions
>MoveFileEx and CopyFile to Move and Copy files (Move
>does a copy src->dest, delete src). I am wondering what
>are the prefered means of doing this on Unix.
You might try File::Copy.