king wrote:
> #!c:\Perl\bin\perl.exe
> use Strict;
> use File::Copy;
> #use File::find;
> $dir = "2.00.A07";
> print "enter the name of the file to be copied:";
> $file=<>;
> chomp $file;
> $filetobecopied = "//Builds/Prerelease/$dir/$file";
>
> $newfile = "C:/PERL";
> copy ($filetobecopied,$newfile) or print "file not found\n";
>
> #find(\&wanted, @directories);
>
> This $dir i.e 2.00.A07 is changing on daily basis.Means new
> directories is getting added So how can this be detected that a new
> dir has been added and the $dir will replaced by the new one.
Use a globbing operator to get all names that match the directory name
pattern and then apply whatever algorithm is necessary to find the
latest one.
--
These are my personal views and not those of Fujitsu Siemens Computers!
Josef Möllers (Pinguinpfleger bei FSC)
If failure had no penalty success would not be a prize (T. Pratchett)
Company Details:
http://www.fujitsu-siemens.com/imprint.html