Beefy Boxes and Bandwidth Generously Provided by pair Networks
XP is just a number

Re: automated file move

by pfaut (Priest)
on Dec 18, 2007 at 00:33 UTC ( #657576=note: print w/replies, xml ) Need Help??

in reply to automated file move

I suspect you want to wait until the writing process closes the file before you copy it and are using the fact that the file isn't growing anymore to assume this has occurred. Since this is Windows, you could probably take advantage of file locking instead. If you attempt to open the file without allowing other accessors, the open should fail unless the other process has closed it. You could retry with a delay until successful.

Another option might be to use a utility like RoboCopy which should be available from one of Microsoft's download sites if it's not on your system already. It should detect locked files and exit with a status indicating whether it succeeded or not.

90% of every Perl application is already written.

Log In?

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://657576]
[1nickt]: Wow. I had heard about the chips on HP cartriddges but not that issue. I rejected HP's equivalent laptop becuase of build quality, very plasticky keyboard. And I believe HP is the champon of bloatware, too.

How do I use this? | Other CB clients
Other Users?
Others scrutinizing the Monastery: (14)
As of 2017-03-27 13:29 GMT
Find Nodes?
    Voting Booth?
    Should Pluto Get Its Planethood Back?

    Results (320 votes). Check out past polls.