'Error opening file' 'Error creating file' 'Error writing to file' 'Queue.dta is in use' or 'File in use' - When creating or restoring a backup
Description

When creating or restoring a backup, you may receive one of the following messages:

  • 'Error creating file...'
  • 'Error opening file...'
  • 'Error writing to file...'

NOTE: These messages may also appear when the software automatically saves files, for example when reconciling your bank and saving the statement PDF.

This message can occur for one of the following reasons:

  • There's no free disk space on the hard drive
  • The data path in the Company file is the incorrect format
  • A folder in the data path doesn't exist
  • The files are locked open
  • You don't have sufficient access rights
  • The files are marked as hidden
  • The backup is corrupt
  • Antivirus software is restricting access
  • A non-standard character in the file name

Don't worry, these errors can be easily resolved by following the steps in this guide.

Cause
Resolution

Before you start 

Once you've checked the above, click Next.

 

Check that there's enough free disk space

  1. Click Help then click About and in the Program Details area, make a note of the Data Directory.
  2. Check that the location where the data is stored has sufficient disk space to restore your backup.

    To do this right click on the drive letter or network path and select properties. You can find the disk space available under Free space.

    If you need any further help finding how much free disk space you have, please contact your IT support.

If this doesn't resolve the issue, click Next.

Check the path in the Company file is correct

  1. Click Help then click About and in the Program Details area, click on the path to the Settings Directory.
  2. Double-click COMPANY and select the option Select the program from a list
  3. Click OK then click Notepad and click OK.
  4. Ensure the path is correct and ensure there's no blank line at the top of the file.

    For example, \\Server01\SageData, ensure there are no /

  5. If you change the path click File then click Save and click File then click Exit.

If this doesn't resolve the issue, click Next.

Does the file mentioned have an extension of .ini?

For example:
'Error creating file C:\Program Files\Sage\Accounts\Desktop.ini'

TIP: A file with the extension .ini is a configuration file which usually holds information about the folder options within a folder.

Delete the file and try the restore or back up again

The backup includes the file .ini which already exists in the folder where the backup is being restored. This file can not be overwritten because it's a Windows system file. You must delete the file and restore the data again. When the data restores the file is also restored therefore you must delete the file again to avoid the issue the next time you restore.

  1. Note the full path in the message, for example C:\ProgramData\Sage\Accounts\2013\Desktop.ini
  2. Browse to the relevant folder, in this example C:\ProgramData\Sage\Accounts\2013
  3. Click Tools then click Folder Options and click View.
    To see the Tools menu, press the left Alt key.
  4. Select Show hidden files and folders, clear the Hide extensions for known file types check box and clear the Hide protected operating system files check box.
  5. Click Apply then click OK and find the file in the message, in this example, Desktop.ini.
  6. Right-click on the file and click Delete then click Yes.
    If you can't delete the file, click Next.
  7. Open Sage Accounts and try the restore or back up again.
  8. If you're restoring, once the restore is complete, repeat steps 2 to 6.
  9. Change the Folder Options back to their original settings.

NOTE: If an All Files backup is restored Sage Accounts may try to restore Desktop.ini twice as it may be in more than one folder. Renaming the file in the data folder restores the Desktop.ini file once but not twice. Therefore the message may appear again. However, the second time this message appears, the data has restored even though the message 'The Restore was unsuccessful' appears.

If this doesn't resolve the issue, click Next.

Does the path in the message exist?

Browse to the folder in the message, for example, if the message is:
'Error creating file C:\ProgramData\Sage\Accounts\2022\Company.000\Reports\VAT\Miscellaneous Reports\TAXCODES.report'

Browse to C:\ProgramData\Sage\Accounts\2022\Company.000\Reports\VAT\Miscellaneous Reports

Can you create or rename the file in the message?

  1. Note the full path in the message, for example C:\ProgramData\Sage\Accounts\2022\Company.000\ACCDATA\QUEUE.DTA
  2. Browse to the relevant folder, in this example C:\ProgramData\Sage\Accounts\2022\Company.000\ACCDATA
  3. Click Tools then click Folder Options and click View.

    To see the Tools menu, press the left Alt key.

  4. Select Show hidden files and folders, clear the Hide extensions for known file types check box and clear the Hide protected operating system files check box.
    If the file exists Right-click on the file, click Rename and delete the last three letters and type OLD then press Enter.

    If the file does exist but can't be renamed, it may be locked.
    If the file doesn't exist Click File then click New and click Text Document, then type the full name of the file, for example, QUEUE.DTA and press Enter.

Create the missing folder and try the restore or back up again

For example, if C:\ProgramData\Sage\Accounts\2021\Company.000\Reports exists but the VAT folder is missing, create a new folder within Reports called VAT. You must then create the remaining folders in the structure. In this example, create a new folder in VAT called Miscellaneous Reports.

  1. Browse to the relevant folder, in this example, C:\ProgramData\Sage\Accounts\2021\Company.000\Reports
  2. Click File then click New and click Folder and type the relevant folder name, in this example VAT then press Enter.
  3. Double-click the new folder and click File then click New and click Folder.
  4. Type the relevant folder name, in this example Miscellaneous Reports and press Enter.
  5. Try the restore or back up again.

If this doesn't resolve the issue, click Next.

Restart the computer which holds the Sage data

If you can't rename the file, it may be locked open on the server. To resolve this restart the server computer.

If restarting the server computer isn't possible, you can close the locked files:

  1. On the computer that holds the data, right-click Computer then click Manage.
  2. Expand Shared Folders, then select the Open Files folder.
  3. To close a file, right-click the file, then click Close Open File to confirm, click Yes.

Try to rename the file again.

If you still can't rename the file it may be due to your Windows permissions. Refer to your network administrator for further advice about how to check and amend Windows permissions.

If you can rename the file, try the restore or back up again. If this doesn't resolve the issue, click Next.

Remove the hidden attribute on all files within company.000

NOTE: This should be done on the computer which holds the data.

  1. Note the data path from the message, for example C:\ProgramData\Sage\Accounts\2023\Company.000
  2. Click Start then click Run and enter CMD then press Enter.
  3. Enter CD\ and press Enter, enter CD and then first folder name, for example CD C:\programdata and press Enter.
  4. Enter CD and the next folder name and press Enter, repeat this for each folder up to Company.000.
  5. Enter attrib -h /S /D, for example CD C:\ProgramData\Sage\Accounts\2023\Company.000 attrib -h /S /D then press Enter.
    The -h removes the hidden attribute, the /S ensures this applies to all files in the folder and the /D ensures this also applies to all of the sub folders.

  6. Close the command prompt window, try the restore or back up again.

    If the message still appears but refers to a different folder, for example, Reports, you must follow the steps again on the relevant folder.

If this doesn't resolve the issue, check the Virtual Store. If Program Data is present in the Virtual Store, this may cause the issue. Check the path and if the named problem file is present, rename it. Example path:

  • C:\Users\<username>\AppData\Local\VirtualStore\Program Data\Sage\Accounts\2023

If the issue is still unresolved, click Next.

Move the data to a new location

  1. Click Help then click About and in the Program Details area, make a note of the Settings Directory.
  2. Create a new folder on the computer which holds your Sage 50 Accounts data.
  3. If your data is on server, share the folder and ensure that all relevant users have Modify permissions allowed.
  4. Browse to the existing Sage Accounts data directory.

    To check the data directory, open Sage Accounts, then click Help and About and the data directory is shown in the Program Details area.

    Copy the following folders. Depending on your version, some of these folders may not exist:
    • Accdata
    • Archives
    • Attachments
    • Bitmap
    • Configs
    • Criteria
    • Defaults
    • Exports
    • Fax
    • HMRCSubmissions
    • Imports
    • Invoices
    • Journals
    • Labels
    • Layouts
    • Letters
    • Memo
    • Reports
    • Taskopt
    • Template
    • TMail
    • VATRtns

  5. Paste these folders into the new folder created in step 2.
  6. Browse to the settings directory noted in step 1 and double-click COMPANY.
  7. Select the option Select the program from a list and click OK then click Notepad and click OK.
  8. Change the path to the new folder location for the data.
  9. Click File then click Save and click File then clcik Exit.
  10. Try the restore or back up again.
[BCB:348:UKI - Connected Service Warning:ECB]

If the issue is still not resolved, click Next

Restore an alternative backup

NOTE: If the issue is backing up rather than restoring we recommend you restart this process.

To test the backup for corruption, if possible, restore a different backup. If the backup restores successfully it's likely that the original backup is corrupt.

For more information about data corruption, please visit desktophelp.sage.co.uk/accounts/errors

 

[BCB:281:UKI Wizard:ECB]



Steps to duplicate
Related Solutions