Windows 10: Copy File and rename if this file exist in destination

Discus and support Copy File and rename if this file exist in destination in Windows 10 Network and Sharing to solve the problem; Hello, I need a script to copy for example C:\file.txt to D:\file.txt and if D:\file.txt exist keep both files every time the script run. Thank you... Discussion in 'Windows 10 Network and Sharing' started by Davit Ubilava, Oct 22, 2019.

  1. Copy File and rename if this file exist in destination


    Hello,


    I need a script to copy for example C:\file.txt to D:\file.txt and if D:\file.txt exist keep both files every time the script run.


    Thank you

    :)
     
    Davit Ubilava, Oct 22, 2019
    #1
  2. temp02 Win User

    Java.nio.file - Copying files

    You can't copy a folder, thats why it generates an exception (you are trying to copy a folder using a copy file function).
    You probably need to list all the files inside that folder and copy one by one
     
    temp02, Oct 22, 2019
    #2
  3. Wozzer Win User
    Java.nio.file - Copying files

    Issue was the above, so thanks temp02.
     
    Wozzer, Oct 22, 2019
    #3
  4. Orerockon Win User

    Copy File and rename if this file exist in destination

    File Explorer rename files with the same name when copying


    Quite frankly I'm surprised no one has brought this up (or I am using the wrong search terms). When copying files in explorer, Windows 7 (I can't remember anything older than that LOL) I am asked what I want to do with copying files that have the same name as existing files in the destination folder. One click, keep the old file and rename the new one, bam, done. Now, trying the same thing in Win 10, I get a really stupid box, Replace the files in the destination (same as the old), Skip these files (ditto), or Let me decide for each file (abotu the same, I don't have any Win 7 boxes to check). So I click on Let me decide... and a list of all the files comes up with checkboxes for each and every one, and two to select all the files in one or both folders. So now I have an extra step compared to Win 7, I have to check off these boxes, then continue. All I had to do is click on copy and rename the files in Win 7. Does anyone else think this is a really stupid and unnecessary complication of a really common thing to do in Explorer? More to the point, is there some setting that I can turn off, to let it replace or rename everything with one simple mouse click? I've tried the old Robocpoy and Rich Copy and they're not acceptable, even more steps that explorer.

    Slightly related question: is there a fully featured alternative to file explorer (by that I mean everything that Win 7 File explorer could do)? Coupled with other "deimprovements" like destroying the insanely useful "recent files & folders" in the folder pane every save/save as menu in every program and replacing it with the fatally flawed "Quick Access" I'm wanting to ditch it altogether. It would be really special if we just could revert to the old File explorer and make life a heck of a lot easier.
     
    Orerockon, Oct 22, 2019
    #4
Thema:

Copy File and rename if this file exist in destination

Loading...
  1. Copy File and rename if this file exist in destination - Similar Threads - Copy File rename

  2. How to rename file to name of existing one with replacing

    in Windows 10 Gaming
    How to rename file to name of existing one with replacing: When I use windows 11 file explorer for renaming file to some file name, which exists in current folder, system offers to rename to some other name adding number... In previous versions it was possible to choose replace existing file and finish task in one action. How can I...
  3. How to rename file to name of existing one with replacing

    in Windows 10 Software and Apps
    How to rename file to name of existing one with replacing: When I use windows 11 file explorer for renaming file to some file name, which exists in current folder, system offers to rename to some other name adding number... In previous versions it was possible to choose replace existing file and finish task in one action. How can I...
  4. Unable to move, copy, delete, or rename a file

    in Windows 10 Network and Sharing
    Unable to move, copy, delete, or rename a file: A user screenshotted a twitter feed and did not rename the file. The file name is now exceedingly long, causing issues with our backup service due to the filepath length. I have tried moving, copying, renaming, and deleting the file, but nothing happens, not even an error. I...
  5. Copy and skipping existing files.

    in Windows 10 Software and Apps
    Copy and skipping existing files.: Is there any way that I can copy files from one folder to another and automatically skipping all existing files in the destination folder using a batch file? I know I can do it usung File Explorer, but I want to know how to do it from a batch file. If I use the /v option,...
  6. Cannot rename files - File or folder does not exist

    in Windows 10 Network and Sharing
    Cannot rename files - File or folder does not exist: When I try and rename a file or folder on my desktop I get an error message - The file or folder does not exist. They do exist. I have full control over them by permissions. I can rename them through CMD. I can rename files in other folders. In looking around the internet I...
  7. Help! : An error occurred while trying to rename a file in the destination directory:...

    in Windows 10 Installation and Upgrade
    Help! : An error occurred while trying to rename a file in the destination directory:...: I keep getting this error message. I think it is in regards to the RealTek Audio Driver failing to install as well. Any help to get the audio driver to install and to fix this error message would be great! [ATTACH]...
  8. Windows shows full file size in destination while file is still copying

    in Windows 10 Network and Sharing
    Windows shows full file size in destination while file is still copying: When copying a large file say 8GB the destination file immediately shows as 8GB while the file is still copying. I have a third party software polling the destination file to see when the whole file is in the destination. Because of this behavior, the third party software...
  9. Unable to move, copy or rename .7z file

    in Windows 10 Network and Sharing
    Unable to move, copy or rename .7z file: i was recentley modding a video game and i downloaded a file with this name Анвил.7z i cant move it delete it or rename it any help ***Original title: Cant delete file with Russian file name***...
  10. File Explorer rename files with the same name when copying

    in Windows 10 Support
    File Explorer rename files with the same name when copying: Quite frankly I'm surprised no one has brought this up (or I am using the wrong search terms). When copying files in explorer, Windows 7 (I can't remember anything older than that LOL) I am asked what I want to do with copying files that have the same name as existing files...