I would like to move a list of files (contained in text file) from one folder to another. The files to be moved will have long file names and the text file will only contain the listing of files to be moved. For example:
pic.bmp
lots of stuff.doc
junk.txt
The OS is Windows XP
Try # 2. How can I Move a list of files using a perl script?
# UNtested code
use strict; use warnings;
use File::Copy;
open(LIST, '%26lt;', 'the text file') or die;
while (my $sFname = %26lt;LIST%26gt;)
{
chomp $sFname;
move("one folder/$sFname", 'another');
} # while
__END__
love song lyrics
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment