I have been working on something that is going to be untarring a file and then taking the contents of the untarred file and copying the files over to another location on the harddisk. However I think I am running into a problem in beteen the untar process and the copy process.

The file untars correctly but when I try to copy it over I get an error saying the file does not exist. Of course I then check the untarred directory and there the files are. I have checked file paths and they are correct, file permissions are correct, and I have even changed directory to the untarred directory and tried that. Still no go.

What I think may be happening is that the File::Copy is trying to copy over the file before it actually shows up from the untar process. Is there anyway I can prove this is what is happening? Also more importantly if this is the case how can I slow the script down and wait for it to show up before trying to copy it without implementing some kind of endless loop checking for it?


In reply to Archive::Tar then File::Copy? by Elijah

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post, it's "PerlMonks-approved HTML":



  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.