#!/usr/bin/perl -- use Path::Tiny; my $src = 'C:/temp (1)J'; my $dst = 'C:/out/'; for my $file ( path( $src )->children ){ if( $file->copy( $dst ) ){ $file->remove; } } __END__ $ tree -f -a "temp (1)J" out temp (1)J |-- temp (1)J/1 `-- temp (1)J/2 out 0 directories, 2 files $ perl mytask.pl $ tree -f -a "temp (1)J" out temp (1)J out |-- out/1 `-- out/2 0 directories, 2 files