[Bioperl-l] retrieving a subset of files from a folder

Minou Nowrousian minou.nowrousian at rub.de
Sat Nov 24 18:24:02 UTC 2012


>Dear Bioperl list,
>I have a folder that has 60,000 files (one file for each phylogenetic tree)
However I only need to work with a subset of 1,000 files from that folder
>(the files are not numbered in order so I cant use the i++ loop in my
bioperl script) Is there a way to write a script that only moves files with
the >names given in a list in a text file i.e. I have a file that has the
names of the files I want to copy fro m the folder and I want to write
script that does >this Thank you so much

I don't know if there is a BioPerl solution, but you could use the
File::Copy module (available from CPAN):

use File::Copy;
 copy("path_to_file_you_want_to_copy","path_to_target_file") or die "Copy
failed: $!";

Regards,
Minou






More information about the Bioperl-l mailing list