FileOps $movefile error
Mike Matthews - Omnis
omnis at lineal.co.uk
Wed May 14 09:25:15 UTC 2025
Ah, I knew there are clever people here on this list.
Mike Matthews
Lineal Software Solutions
Commercial House, The Strand<x-apple-data-detectors://1/1> Barnstaple, Devon, EX31 1EU<x-apple-data-detectors://1/1>
omnis at lineal.co.uk<mailto:mike.matthews at lineal.co.uk>
www.lineal.co.uk<http://www.lineal.co.uk/>
www.sqlworks.co.uk<http://www.sqlworks.co/>
On 14 May 2025, at 10:14, Rudolf Bargholz <rudolf at bargholz.ch> wrote:
Warning: Unusual link
This message contains an unusual link, which may lead to a malicious site.
Confirm the message is safe before clicking any links.
Hello Andy,
If you download the sysinternals "Process Monitor", you can set up a filter on the file you are trying to copy by filtering on the "Path" and setting the value to the exact full path of the file. This will tell you which application is locking your file.
Note, a FileOps.$open() needs to be followed by a FileOps.$close(), or the file will remain locked by the omnis.exe .
Regards
Rudolf Bargholz
-----Ursprüngliche Nachricht-----
Von: omnisdev-en <omnisdev-en-bounces at lists.omnis-dev.com> Im Auftrag von Rudolf Bargholz
Gesendet: Mittwoch, 14. Mai 2025 11:03
An: OmnisDev List - English <omnisdev-en at lists.omnis-dev.com>
Betreff: AW: FileOps $movefile error
Hello Andy,
A FileOps.$open() **without** the kReadOnly will fail if the file has been opened/locked by Omnis or some other application.
Regards
Rudolf Bargholz
-----Ursprüngliche Nachricht-----
Von: omnisdev-en <omnisdev-en-bounces at lists.omnis-dev.com> Im Auftrag von Mike Matthews - Omnis via omnisdev-en
Gesendet: Mittwoch, 14. Mai 2025 10:58
An: OmnisDev List - English <omnisdev-en at lists.omnis-dev.com>
Cc: Mike Matthews - Omnis <omnis at lineal.co.uk>
Betreff: Re: FileOps $movefile error
Hello Andy,
Turn it off and on. I wonder if the file/OS thinks it is open, so restart Windows as that should set all open file stats possibly. Works with DF1 files.
I suspect there is a way of examining a file to see if it is open, but that knowledge is above my pay grade. And then get the file to be closed for the OS to then move.
Mike Matthews
Lineal Software Solutions
Commercial House, The Strand<x-apple-data-detectors://1/1> Barnstaple, Devon, EX31 1EU<x-apple-data-detectors://1/1>
omnis at lineal.co.uk<mailto:mike.matthews at lineal.co.uk>
www.lineal.co.uk<http://www.lineal.co.uk/>
www.sqlworks.co.uk<http://www.sqlworks.co/>
On 13 May 2025, at 22:35, Andy Hilton <andyh at totallybrilliant.com> wrote:
Warning: Unusual link
This message contains an unusual link, which may lead to a malicious site.
Confirm the message is safe before clicking any links.
That’s the curious thing, although it is a library file that I am trying to move, it is a library that has not yet been opened by the application, so I fail to see how the file could be ‘open’ - it has just been copied down from an ftp site into a ‘downloads’ folder from where I am moving it into the appropriate position within the application setup (and as I mentioned I can manually copy it without issue)
Andy Hilton
Totally Brilliant Software Inc
Phone (US) : (863) 409 4870
Phone (UK) : 0207 193 8582
On May 13, 2025, at 5:30 PM, Reg Paling <reg.paling at lokanet.com> wrote:
Hi Andy,
This page:
https://www.omnis.net/developers/resources/onlinedocs/index.jsp?detail=FunctionRef/Functions_A-Z/fileopserrorcodes.html
says:
kFileOpsMoreFilesOpen -47 One or more files are open
Is it a library that's still open?
Kind regards,
Reg
On Wed, May 14, 2025 at 7:19 AM Andy Hilton <andyh at totallybrilliant.com>
wrote:
Does anyone have the official meaning of error code ‘-47’ from a
FileOps.$movefile operation ?
I have an installer trying to move files within my app from one location
to another - both within the users ‘AppData’ area (this is on my least
favorite side, Windows !) and I am getting this error
Note : I can manually copy the files without issue - which is why I am a
tad confused as to what is actually going on with the FileOps call !
Andy Hilton
Totally Brilliant Software Inc
Phone (US) : (863) 409 4870
Phone (UK) : 0207 193 8582
_____________________________________________________________
Manage your list subscriptions at https://lists.omnis-dev.com
Start a new message -> mailto:omnisdev-en at lists.omnis-dev.com
_____________________________________________________________
Manage your list subscriptions at https://lists.omnis-dev.com
Start a new message -> mailto:omnisdev-en at lists.omnis-dev.com
_____________________________________________________________
Manage your list subscriptions at https://lists.omnis-dev.com
Start a new message -> mailto:omnisdev-en at lists.omnis-dev.com
More information about the omnisdev-en
mailing list