[GH-ISSUE #142] Duplicate file with "copy" not working #103

Closed
opened 2026-03-02 15:55:48 +03:00 by kerem · 8 comments
Owner

Originally created by @VincentVandalon on GitHub (Mar 17, 2019).
Original GitHub issue: https://github.com/prasathmani/tinyfilemanager/issues/142

It is currently not possible to duplicate a file: it is possible to copy a file to a new directory but an error is thrown if the file is copied to the same directory. There is no option for copying into the same directory with a new/modified file name.

By the way, thank you very much for creating this nice and convenient tool!

Originally created by @VincentVandalon on GitHub (Mar 17, 2019). Original GitHub issue: https://github.com/prasathmani/tinyfilemanager/issues/142 It is currently not possible to duplicate a file: it is possible to copy a file to a new directory but an error is thrown if the file is copied to the same directory. There is no option for copying into the same directory with a new/modified file name. By the way, thank you very much for creating this nice and convenient tool!
kerem 2026-03-02 15:55:48 +03:00
  • closed this issue
  • added the
    question
    label
Author
Owner

@prasathmani commented on GitHub (Mar 18, 2019):

Copy to same path is not allowed, because you're already there, if you want to create a backup of the file, use backup option in the edit.

<!-- gh-comment-id:473799041 --> @prasathmani commented on GitHub (Mar 18, 2019): Copy to same path is not allowed, because you're already there, if you want to create a backup of the file, use backup option in the edit.
Author
Owner

@VincentVandalon commented on GitHub (Mar 19, 2019):

I implemented some code to also support duplicating a file (quite inline with the current approach of copying a file) for my own use which might be of interest for the project as well. See also pull request "Added duplicate functionality" #146 (note that I closed the first pull request and opened a new one because I noticed that you can also copy and therefore duplicate folders).

I agree that the same functionality can be achieved by using the backup functionality but most users won't look there and they probably expect duplicate next to copy.

<!-- gh-comment-id:474472836 --> @VincentVandalon commented on GitHub (Mar 19, 2019): I implemented some code to also support duplicating a file (quite inline with the current approach of copying a file) for my own use which might be of interest for the project as well. See also pull request "Added duplicate functionality" #146 (note that I closed the first pull request and opened a new one because I noticed that you can also copy and therefore duplicate folders). I agree that the same functionality can be achieved by using the backup functionality but most users won't look there and they probably expect duplicate next to copy.
Author
Owner

@prasathmani commented on GitHub (Mar 20, 2019):

@VincentVandalon thank you for your contribution, let me check.

<!-- gh-comment-id:474773489 --> @prasathmani commented on GitHub (Mar 20, 2019): @VincentVandalon thank you for your contribution, let me check.
Author
Owner

@johnwmail commented on GitHub (Mar 21, 2019):

Hi, why need the new duplicate button, instead of merge to copy?
Thanks.

<!-- gh-comment-id:475098184 --> @johnwmail commented on GitHub (Mar 21, 2019): Hi, why need the new duplicate button, instead of merge to copy? Thanks.
Author
Owner

@VincentVandalon commented on GitHub (Mar 21, 2019):

Merging with copy requires a more extensive rewrite of the code (the current GUI isn't very suitable for a combined copy/duplicate). It would even be nicer, but I did not have the time to do it that way.

<!-- gh-comment-id:475122982 --> @VincentVandalon commented on GitHub (Mar 21, 2019): Merging with copy requires a more extensive rewrite of the code (the current GUI isn't very suitable for a combined copy/duplicate). It would even be nicer, but I did not have the time to do it that way.
Author
Owner

@johnwmail commented on GitHub (Mar 21, 2019):

Hi, I mean like this, thanks.

dup.diff.txt

<!-- gh-comment-id:475132425 --> @johnwmail commented on GitHub (Mar 21, 2019): Hi, I mean like this, thanks. [dup.diff.txt](https://github.com/prasathmani/tinyfilemanager/files/2991137/dup.diff.txt)
Author
Owner

@VincentVandalon commented on GitHub (Mar 21, 2019):

Now I understand what you mean, that might work. I will play around and update the pull request asap

<!-- gh-comment-id:475139332 --> @VincentVandalon commented on GitHub (Mar 21, 2019): Now I understand what you mean, that might work. I will play around and update the pull request asap
Author
Owner

@VincentVandalon commented on GitHub (Mar 22, 2019):

I have updated the pull request to now include the merged functionality.

<!-- gh-comment-id:475785974 --> @VincentVandalon commented on GitHub (Mar 22, 2019): I have updated the pull request to now include the merged functionality.
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/tinyfilemanager#103
No description provided.