Cannot create a file when that file already exists. You might have a conflict between short and long file names where this short name conflicts with an existing long file name.

When running a Job, Schedule or Real-Time Monitor the following warning is received:

Unable to rename temporary file [path to file].

Cannot create a file when that file already exists.

You might have a conflict between short and long file names where this short name conflicts with an existing long file name.

This action will not be retried.

Cause and Resolution

When a Windows operating system creates a file with a long file name, for compatibility, a short file name is created automatically under the covers. This allows operating systems that only support 8.3 formatted names to access the file.

When the files are stored only on a single machine this short name generation is not a problem. However, when synchronizing files between multiple machines it can cause conflicts. This warning is presented when a long file name already exists in the destination directory that has the same internal short file name as the short file name in the message. For example, if the error is on a file named DOCUM~1.TXT there is a file in the destination directory with a name such as Document for Sales.txt that has the same short file name. NTFS will not allow two files with the same name to exist in the same directory and hence the warning.

This issue can be difficult to resolve because Windows does not provide a way to see the auto generated short file name on files with long file names. Often it is easiest to simply rename the 8.3 format file names.

If you are using modern operating systems, you can also disable short file name generation and strip short file names from files. Disabling short file names is a performance optimization and can be safely done if you have no legacy DOS or Windows 3.1 applications that need to interact with the data. If you strip the short file names from the files, this warning will disappear. It is important to note that disabling the generation of short file names does not change files that already have a short file name. Further detail on these options can be found at https://kb.softwarepursuits.com/article.php?id=75.

Once the issue is addressed, you must trigger a rescan for the problem files to be processed if using a Change Journal enabled Schedule or a Real-Time Monitor. This can be accomplished by right clicking on the item and selecting "Rescan files."