Page 1 of 1

Question about file I/O

Posted: Tue Jul 02, 2024 10:55 pm
by flaviofornazier
Hi Guys!

I hope you're well! =)

I have a software running on DosBox-X (Windows 10 and 11). This software will write text files to be monitored,
read and deleted by a PB program that I intend to write and run it in taskbar.

Well, my question is: How my PB program will know that the file generated by my DosBox-X software is already closed?

Could anyone point me to a good technique to do that job without errors?

Thank you in advance.

Re: Question about file I/O

Posted: Tue Jul 02, 2024 11:06 pm
by Kiffi

Code: Select all

Debug RenameFile(YourFile, YourFile)
When "YourFile" is open, you get a 0 as result.

Re: Question about file I/O

Posted: Tue Jul 02, 2024 11:23 pm
by flaviofornazier
Kiffi wrote: Tue Jul 02, 2024 11:06 pm

Code: Select all

Debug RenameFile(YourFile, YourFile)
When "YourFile" is open, you get a 0 as result.
Thank you very much Mr. Kiffi.

Now I got it.

Cheers.