kilaru rajeev wrote: > Hi, Hello,
> I got some files in $BNY_DOWNLOAD which is a directory in windows. Now i > have to identify most recent one in that file and > have to move it $BNY_DATA directory it is also a directory. To identify the > most recent file I used sort command and sorted it > by using -M and and space ship operators. It is returning list of files in > that directory that are sorted by the last modification order. > I'm getting that most recently modified as the first element in the sorted > list. Now I want to move this file from this $BNY_DOWNLOAD > to $BNY_DATA directory. I'm not familiar with the windows environment > that's why please help elaborately. Waiting for your earlier responce. > Please note I'm have to use the $BNY_DATA and $BNY_DOWNLOAD while copying. To move the file, something like: rename "$BNY_DOWNLOAD/$file", "$BNY_DATA/$file" or die "Cannot move '$BNY_DOWNLOAD/$file' $!"; If you want to *copy* the file like the Subject line says: perldoc File::Copy John -- use Perl; program fulfillment -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] <http://learn.perl.org/> <http://learn.perl.org/first-response>