in reply to how to move the folder from one directory to another directory?

The core module File::Copy has a move function.

use File::Copy; move("/dev1/fileA","/dev2/fileB");

Replies are listed 'Best First'.
Re^2: how to move the folder from one directory to another directory?
by vasuperl (Acolyte) on Dec 28, 2014 at 05:33 UTC

    thank you for your response.. But here the session folder is created dynamically along with the time stamp. Here what does file A and file B means??

      But here the session folder is created dynamically along with the time stamp. Here what does file A and file B means??

      The linked documentation says: The move function also takes two parameters: the current name and the intended name of the file to be moved

      So move( oldname, newname )

      use Path::Tiny qw/ path /; path( $oldname )->move( $newname );

        I can't say the name of the folder as it will be created dynamically with the time stamp.... So how can we move that folder without knowing the name of the folder