#!/usr/bin/perl use strict; use File::Copy; my @files = ('one.txt','two.txt','three.txt'); for my $file (@files) { if (-f "old/$file") { print "old/$file moved to new/$file\n" ; copy("old/$file", "new/.") or die "Error Coping /old/$file: $! +"; } }
In reply to Re: writtings files to a new folder
by siva kumar
in thread writtings files to a new folder
by heidi
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |