Note: I already tried this... my $cmd = "dir \/b $dir\\*.bat";