in reply to copy files to another directory
However, if you wanted to save on the typing you could use a system call (DOS version shown below, I think this'll probably be slower though), you could write this like:#! usr/bin/perl -w use File::Copy; my @list = <C:\LOCATION\*.rtf>; foreach my $file(@list){ copy ($file,"C:\Temp\"); }
this just uses a DOS copy command (the /y is just so that you're not prompted when a file is being overwritten)#! usr/bin/perl -w system ("copy /y LOCATION\\*.rtf C:\Temp");
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Re: copy files to another directory
by jasonk (Parson) on Feb 19, 2003 at 14:19 UTC |