Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Allow copying into same folder, append " (2)" #9931

Closed
dairaine opened this issue Jun 20, 2018 · 9 comments
Closed

Allow copying into same folder, append " (2)" #9931

dairaine opened this issue Jun 20, 2018 · 9 comments
Labels
enhancement feature: files good first issue Small tasks with clear documentation about how and in which place you need to fix things in.
Milestone

Comments

@dairaine
Copy link

I often need to make a backup before file sharing in modification mode. A possibility to copy or move files is implemented in Nextcloud, but it seems not possible to duplicate a file in the same folder because a renaming is not allowed. It would be nice to have such a mechanism allowing a duplication in one click.

@dairaine dairaine changed the title Renaming file in the duplicate process Renaming file in the duplication process Jun 20, 2018
@nextcloud nextcloud deleted a comment from nextcloud-bot Jun 20, 2018
@nextcloud nextcloud deleted a comment from nextcloud-bot Jun 20, 2018
@MorrisJobke
Copy link
Member

cc @nextcloud/designers Does this make sense from an UX point of view? I would just add it to the context menu where we already have the copy and move operations.

@MorrisJobke MorrisJobke added the good first issue Small tasks with clear documentation about how and in which place you need to fix things in. label Jun 20, 2018
@jancborchardt jancborchardt changed the title Renaming file in the duplication process Allow copying into same folder, append "(2)" Jun 21, 2018
@jancborchardt jancborchardt changed the title Allow copying into same folder, append "(2)" Allow copying into same folder, append " (2)" Jun 21, 2018
@jancborchardt
Copy link
Member

jancborchardt commented Jun 21, 2018

The problem here is that

it seems not possible to duplicate a file in the same folder

Because in the case of copying it in the same folder, you get this technical notification:

Could not copy "filename.txt", target exists

Instead, copying should simply work, and append a " (2)" to the filename. So from "filename.txt" to "filename (2).txt". (Or a " (3)" if a 2 already exists etc – just like we do for files drop.)

@lightweight
Copy link

Or use what most filemanagers do: "copy of filename" as the default filename, and then it can be renamed... I agree that the current behaviour (not being able to copy a file into the same directory) is a significant problem for me (e.g. if I create a template/example file that I want to replicate as a specifically named file and alter the filename, I have to copy it first to another folder/directory first, and then back, which is ponderous and seemingly unnecessary given the fairly standard behaviour of other file managers).

@jancborchardt
Copy link
Member

@lightweight ok, "Copy of filename.txt" seems good too! :) What Gnome does:

  • filename (copy).txt
  • filename (another copy).txt
  • filename (3rd copy).txt
  • filename (4th copy).txt
  • etc

This is more obvious than just appending the number, which could also be a conflict or having uploaded the original file again.

@sunjam
Copy link

sunjam commented Jul 29, 2018

I just encountered this issue when attempting to make a duplicate of a txt file in the Notes directory via the copy command. It is not currently possible, but I'd love to be able to duplicate the text file + re-name it to .md at the same time while using the copy menu. Something along the lines of:

"Markdown Examples.txt" already exists; Do you want to Duplicate or Rename the copy?

instead of current

Could not copy "Markdown Examples.txt"; target exists.

@greenido
Copy link

I sent a PR with a fix: #10825

@zeigerpuppy
Copy link

This remains an issue when copying a whole folder, the error target exists prevents duplicating a folder

@jancborchardt
Copy link
Member

@zeigerpuppy could you open a separate issue for that? :) It should indeed work the same as for files.

@zeigerpuppy
Copy link

sure @jancborchardt, I have created issue #18846

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement feature: files good first issue Small tasks with clear documentation about how and in which place you need to fix things in.
Projects
None yet
Development

No branches or pull requests

9 participants