in reply to Re: File::Copy - move() function corrupting files
in thread File::Copy - move() function corrupting files

I can't do it this way because the pdf files are initially created by Abobe PDF Printer and I don't think there is a way to change the extensions of what it prints to something besides .pdf
  • Comment on Re^2: File::Copy - move() function corrupting files

Replies are listed 'Best First'.
Re^3: File::Copy - move() function corrupting files
by afoken (Chancellor) on Aug 26, 2014 at 20:22 UTC

    Don't scan for files yourself, make the operating system notify you of changes in the filesystem (inotify or similar APIs). Make sure your code starts processing only after a new file (opened for writing) is closed. For inotify, this seems to be indicated by the IN_CLOSE_WRITE event.

    Alexander

    --
    Today I will gladly share my knowledge and experience, for there are no sweeter words than "I told you so". ;-)