Question about file I/O

Just starting out? Need help? Post your questions and find answers here.
User avatar
flaviofornazier
User
User
Posts: 11
Joined: Mon Jan 06, 2014 8:28 pm
Location: Brazil

Question about file I/O

Post 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.
PB 6.10 LTS x86/64 - WXP - W7/x86-64 - W8/x64 - W10 x86/x64 - W11 - Ubuntu Mate 23 x86/x64 - OSX Yosemite 10.9
User avatar
Kiffi
Addict
Addict
Posts: 1485
Joined: Tue Mar 02, 2004 1:20 pm
Location: Amphibios 9

Re: Question about file I/O

Post by Kiffi »

Code: Select all

Debug RenameFile(YourFile, YourFile)
When "YourFile" is open, you get a 0 as result.
Hygge
User avatar
flaviofornazier
User
User
Posts: 11
Joined: Mon Jan 06, 2014 8:28 pm
Location: Brazil

Re: Question about file I/O

Post 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.
PB 6.10 LTS x86/64 - WXP - W7/x86-64 - W8/x64 - W10 x86/x64 - W11 - Ubuntu Mate 23 x86/x64 - OSX Yosemite 10.9
Post Reply