nextcloud/server · error · HintException

A file or folder with that name already exists in this folde

Error message

A file or folder with that name already exists in this folder

What it means

Error "A file or folder with that name already exists in this folder" thrown in nextcloud/server.

Source

Thrown at apps/files/src/actions/moveOrCopyAction.ts:198

							const { data } = await client.stat(
								destinationPath,
								{
									details: true,
									data: getDefaultPropfind(),
								},
							) as ResponseDataDetailed<FileStat>
							emit('files:node:created', resultToNode(data))
						}
					} else {
						await client.moveFile(currentPath, destinationPath)
						// Delete the node as it will be fetched again
						// when navigating to the destination folder
						emit('files:node:deleted', node)
					}
				} catch (error) {
					logger.debug(`Error while trying to ${method === MoveCopyAction.COPY ? 'copy' : 'move'} node`, { node, error })
					if (error.response?.status === 412) {
						throw new HintException(t('files', 'A file or folder with that name already exists in this folder'))
					} else if (error.response?.status === 423) {
						throw new HintException(t('files', 'The files are locked'))
					} else if (error.response?.status === 404) {
						throw new HintException(t('files', 'The file does not exist anymore'))
					} else if ('response' in error && error.response) {
						const parser = new DOMParser()
						const text = await (error as WebDAVClientError).response!.text()
						const message = parser.parseFromString(text ?? '', 'text/xml')
							.querySelector('message')?.textContent
						if (message) {
							throw new HintException(message)
						}
					}
					throw error
				} finally {
					Vue.set(node, 'status', undefined)
				}
			})

View on GitHub (pinned to ecdeb153ff)

When it happens

Trigger: Thrown at apps/files/src/actions/moveOrCopyAction.ts:198 when the library encounters an invalid state.

Common situations: See trigger scenarios.


AI-assisted analysis of nextcloud/server@ecdeb153ff (2026-08-17). Data as JSON: /api/errors/6cbe8ff641ffba91. Report an issue: GitHub.