Page 1 of 1

File in Use

Posted: Mon Jan 22, 2024 7:42 pm
by gregorys7717
Hello, quick question. I have GPhotoshow pointing to a file share. When I try to delete the file it is says it is in use.

I have multiple clients using the same directory \ files. Any ideas on how to resolve this?

Re: File in Use

Posted: Mon Jan 22, 2024 8:57 pm
by gpb
Hello,
I am not sure I understood your question, what is in use ? Image files ? The directory where images are stored ?
In any case gPhotoShow opens files when it loads something then files are closed, they normally stay open just the time needed to read and decode the image.

Re: File in Use

Posted: Mon Jan 22, 2024 9:24 pm
by gregorys7717
Hi Sorry,

thanks for the quick response. Let me try and explain a little better. I have 8 pcs running the software, they are all pointed as the same file share \ folder. They are all using the same files \ folders. We are only displaying images.

The problem seems to be that, we want to update \ add new files to be displayed (replace) the existing files to be displayed.

The problem is that many of the clients are still accessing the files and they cannot be deleted from the share as they show in use.

We have them set to display for 10 seconds.

Re: File in Use

Posted: Tue Jan 23, 2024 10:23 am
by gpb
You cannot replace or delete files while they are in use by another program.
The typical solution in these cases is to implement a retry mechanism, when the file cannot be replaced or deleted because it is in use, wait some time and try again. Wait time could be somewhere from 100ms to 1 second. A few attempts are usually enough.