You cannot find out file like lock state other way then try to do something with the file. If you use version 3.2 or later you can do something like the following RETRY: OnErrorGoto DO_WAIT FileRename ... OnErrorStop GoTo AFTER_RENAME DO_WAIT: Wait 600 GoTo RETRY AFTER_RENAME: : I have a file that gets created by Oracle. : I have a file-watch job on the scheduler that looks for it and emails it when : it arrives, renames it and backs it up. : Problem is that I get the Error renaming file message - I tried to WAIT(600) : beforehand but this is not ideal as Oracle may take longer before it : releases the file. : Is there a way of telling if a file is not lovked by another application so : you know you can safely rename it ?
|