Re: find/copy most recent version of file?



"JB" == John Bokma <john@xxxxxxxxxxxxxxx> writes:

JB> "Uri Guttman" <uri@xxxxxxxxxxxxxxx> writes:
>>>>>>> "G" == Geoff <geoff@xxxxxxxxxxxxxxx> writes:
>>
G> The code below works, i.e. I get the latest set of files!
>>
>> for some value of work.
>>
G> my $file_name ='';
G> my %file_access;
G> my %file_full;
G> my $destiny = "c:/a-temp3/$file_name";
>>
>> what do you think is in $destiny now? what was in $file_name? this does
>> not do what you seem to think it does. interpolation is not delayed.

JB> [1] if dest is a dir, the file is copied into the dir, what's what the
JB> OP want.

my concern (docs not checked) is whether file::copy will handle a
filename in the dest dir with missing dir parts. as in the dest is /foo
and the file is found in bar/baz.text. will copy work with
/foo/bar/baz.text is bar isn't there? unix cp won't handle that. this
was my guess as to some of the errors the OP was getting but given no
proper debug printing and the usual nonsense from the OP, i wasn't sure.

uri

--
Uri Guttman ------ uri@xxxxxxxxxxxxxxx -------- http://www.sysarch.com --
----- Perl Code Review , Architecture, Development, Training, Support ------
--------- Gourmet Hot Cocoa Mix ---- http://bestfriendscocoa.com ---------
.



Relevant Pages

  • SCP from UNIX box to Windows server
    ... I'm having problems sending a file from a UNIX box to a windows server. ... scp: warning:. ... (dest): ...
    (comp.security.ssh)
  • Re: Ada.Command_Line and wildcards
    ... With other operating systems I've worked with, you can enter a command ... to rename a bunch of files. ... Unix makes this difficult. ... to move all *.txt files to dest. ...
    (comp.lang.ada)
  • Re: find/copy most recent version of file?
    ... JB> if dest is a dir, the file is copied into the dir, what's what the ... unix cp won't handle that. ... proper debug printing and the usual nonsense from the OP, ...
    (comp.lang.perl.misc)
  • Re: AT&T or Intel syntax ?
    ... MOV src, dest, which is less than a decade before Intel's ... rise of Unix. ...
    (comp.lang.asm.x86)