Beefy Boxes and Bandwidth Generously Provided by pair Networks
Do you know where your variables are?
 
PerlMonks  

comment on

( [id://3333]=superdoc: print w/replies, xml ) Need Help??

I found that the file that could not be copied over, the one at the destination, was owned by the local Administrators while other files in the same folder were owned by SYSTEM. I changed it to SYSTEM to match and the problem went away. I don't understand this since both have full control access to the file. Setting it back to Admins didn't cause the problem to reappear. This issue might have been cleared by something else I did to the security settings without realizing while investigating.

I was able to duplicate what you described with the DENY write access setting.

Your observation about my clear_readonly_bit() function was a good one. In this case I'm always copying folders but I wanted to set it up in case someone else puts a file in the list to copy. Thanks!

Update: I found if I set $File::Copy::Recursive::RMTrgFil to true it will delete the target file first even if it has the deny setting. I don't want to do this all the time since normally only a few files will change or be added. But I can use this in the case where there is a copy error to retry by setting $File::Copy::Recursive::RMTrgFil true locally.


In reply to Re^2: File::Copy::Recursive::dircopy failing without error in $! by Lotus1
in thread File::Copy::Recursive::dircopy failing without error in $! by Lotus1

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



  • Are you posting in the right place? Check out Where do I post X? to know for sure.
  • Posts may use any of the Perl Monks Approved HTML tags. Currently these include the following:
    <code> <a> <b> <big> <blockquote> <br /> <dd> <dl> <dt> <em> <font> <h1> <h2> <h3> <h4> <h5> <h6> <hr /> <i> <li> <nbsp> <ol> <p> <small> <strike> <strong> <sub> <sup> <table> <td> <th> <tr> <tt> <u> <ul>
  • Snippets of code should be wrapped in <code> tags not <pre> tags. In fact, <pre> tags should generally be avoided. If they must be used, extreme care should be taken to ensure that their contents do not have long lines (<70 chars), in order to prevent horizontal scrolling (and possible janitor intervention).
  • Want more info? How to link or How to display code and escape characters are good places to start.
Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others having a coffee break in the Monastery: (4)
As of 2024-04-23 22:55 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found