maha ahmed | 24 Nov 20:04 2012

Re: retrieving a subset of files from a folder

Thanks everyone , I actually found a one line command that I am going to
xargs -a file_list.txt mv -t /path/to/des
thanks for your help I will read have a look at the readings you suggested
thank you

On Sat, Nov 24, 2012 at 8:24 PM, Minou Nowrousian
<minou.nowrousian <at>>wrote:

> >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
> _______________________________________________
> Bioperl-l mailing list
> Bioperl-l <at>