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

Replies are listed 'Best First'.
Re: folder moving
by Molt (Chaplain) on Apr 24, 2002 at 09:49 UTC

    File::Copy has a nice 'move' function for moving files and folders. Below is a very naive implementation of a 'move' command for you to have a peek at. It's a very simple to use module.

    #!/usr/bin/perl -w use strict; use File::Copy; my ($from, $to) = (shift, shift); unless ($from and $to) { die ("Usage: $0 <Source> <Destination>\n"); } move ($from, $to);
Re: folder moving
by hakkr (Chaplain) on Apr 24, 2002 at 10:47 UTC
    You should use File:Copy to maintain portability but assuming nix you could use the system.

    system("mv /myfile /home/myfiledestination");