WinBatch Tech Support Home

Database Search

If you can't find the information using the categories below, post a question over in our WinBatch Tech Support Forum.

TechHome

Error Codes

Can't find the information you are looking for here? Then leave a message over on our WinBatch Tech Support Forum.

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/FileMove, you may be able to access the file for copying/moving.

If that does not work, maybe try...

IntControl(39,2,0,0,0)

Article ID:   W15143
File Created: 2009:09:29:10:52:38
Last Updated: 2009:09:29:10:52:38