Error 1004: FileMove: FROM file open failed
Keywords: Error 1004: FileMove: FROM file open failed
Question:
I'm using FILEMOVE to relocate a file named TAX_KEY_ACH_HB202_2001116140729.OUT, but if fails with Error 1004: FileMove: FROM file open failed. I can manually open this file with a windows editor. Any ideas why I can't use FILEMOVE, FILERENAME, or FILECOPY commands on this file.Answer:
In cases like this, it is usually that another application has a share lock on the file that allows it to write to the file while allowing other applications to read it.By default WinBatch does not like this sort of thing.
You will probably not be able to move or rename it, but by using
IntControl(39,3,0,0,0)In your script prior to the FileCopy, you may be able to access the file for copying.If that does not work, maybe try...
IntControl(39,2,0,0,0)
Article ID: W15143