in reply to read copy and moving files
opendir DIR, "DIR_A"; while(defined(my $item = readdir DIR)){ open FILE,"DIR_A/$item" or warn "$!", next; open COPY,"COPIES/$item" or warn "$!", next; while (read FILE,my $buffer,4096){ print COPY $buffer; } close FILE; close COPY; exec("mv","DIR_A/$item","DIR_B/$item"); # performes an mv command +like on the command line } closedir DIR;
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Re: read copy and moving files
by cal (Beadle) on Oct 16, 2002 at 22:02 UTC | |
by nothingmuch (Priest) on Oct 16, 2002 at 22:12 UTC | |
by softworkz (Monk) on Oct 17, 2002 at 15:12 UTC |