Jump to content
View in the app

A better way to browse. Learn more.

FMForums.com

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

Occasional export error says file could not be created. Use a different name, etc.

Featured Replies

The basics :

I have a script that runs every hour. After running it exports the records and saves them as an XML file through the use of a style sheet. The file is then uploaded to Amazon.

To help with the issue of having multiple saved files build up in the drives folder the same file name is used each time overwriting the previous export.

Problem :

The script might run for only 1 day or several days but ultimately it produces an error ... "WHATEVERFILE.XML" could not be created on this disk. Use a different name, make more room on the disk, unlock it or use a different disk.

For whatever reason FM is not closing the file (releasing it or whatever after one of the exports) and thus locking it.

Efforts to fix :

I thought maybe a 'flush cache to disk' would help so I inserted one before the export with a 5 second pause.

I just really have no idea what to do here. I've search the web but can't seem to find anything. I know I could just use a different filename each time but I really want to keep the name the same.

Only Solution so far:

Restart the solution and the file to export to can then be overwritten ....

The question is why is FM keeping the exported file open, not releasing it or whatever it's doing and what can I do to fix it?

Suggestions appreciated!

On the Mac I would try Activity Monitor to see what the system says is happening. Gotta be throwing an error of some sort. Just maybe you could script a delete old file before printing the new one to disk. Just a lame idea it could be system related.

On Windows, I use Unlocker http://www.emptyloop.com/unlocker/ to check which processes have a particular file open. Have you specifically checked to see if FileMaker is the process that has locked the file? If not, use something like Unlocker to confirm.

  • Author

I'm on Windows , just to clarify, and the file can't be deleted because it's still open from the last overwrite ... but that's at least an idea.

Thanks Dan on the unlocker. I'll give that a try but I'm almost positive it's an FM issue.

  • 2 weeks later...
  • Author

Still having an issue and can't seem to get Unlocker installed correctly. Guess I'll try another program.

ALSO ..... if I go to the file, right click and chose delete I get back a window stating :

This action can't be completed because the file is opened in Filemaker Pro Advanced

So I do know that FMP is the culprit but no idea why it's kept the file open so that it can't be overwritten.

Still open to suggestions ......

I don't understand what's causing the root issue here, but a possible work-around might be to export records to a different file after exporting your XML file. If FileMaker is keeping the last file it exported to locked, then this might work for you. If you do this, try exporting to the temp directory using the same file name, and possibly export an empty found set, or something like that to reduce the load on FileMaker.

If you quit FMP can you then delete the file? If so it's FMP. If not it could still be FMP setting the file's lock flag. I'd try the temp directory idea as a workaround. If that doesn't work maybe alternating directories will do. Then maybe file a bug report and wait for a bugfix.

On the Mac select the file and Get Info where you can see the lock flag and read/write permissions. I've run across a few buggy ones that can't be unlocked even by system admin. These can be deleted with a forced delete command. Of course, finding a bugged flag doesn't tell you how it got that way.

I'm assuming you've already tried to force close the file with your script.

  • Author

Interesting ideas from both .... I guess I have some work to do this weekend.

qube99 :

Yes .... if I quit FMP I can delete the file. So I know it's FMP that is the problem.

Yes .... I tried using a force close. Didn't help.

This takes a few days to let the error occur but I'll be back to check if anyone else has an idea and to report on where I am.

Thanks!

  • Author

Nothing worked. This is really aggravating !!

I opened an issue on:

http://forums.filemaker.com/hives/1eea103f05/summary

I wish I could figure out why this is happening ............ and how to fix it.

Create an account or sign in to comment

Important Information

By using this site, you agree to our Terms of Use.

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.