Merge .tar with CMD


  1. Posts : 29
    Windows 10 Pro, 64-bit
       #1

    Merge .tar with CMD


    Hello all,

    My server backups are automatically send to Onedrive, but the Onedrive API splits the .tar files.
    So I need to merge the files, before I can open them on my PC.

    The backups have a different names each day, so it's a pain in the ass to always look for the file names, and then merge.

    Is there a CMD command that can do that automatically ?

    This is the command:
    copy /B/Y backup_1909051552.tar + backup_1909051552.tar1 D:\Onedrive\serverbackup.tar

    I would like CMD to auto find the name of the .tar files "backup_1909051552".
    Something like:
    copy /B/Y .tar + .tar1 D:\Onedrive\serverbackup.tar

    I hope you understand what I'm asking, and if this is possible?
    Attached Thumbnails Attached Thumbnails Merge .tar with CMD-2019-09-06-00-50-44.jpg  
      My Computer


  2. Posts : 429
    Windows 10
       #2

    I think it is possible to create a batch file that does the job but I wonder why you are not using the date on the destination file: Serverbackup.tar. Are you aware that the file would be overwriten whenever there is a new backup?
      My Computer


  3. Posts : 29
    Windows 10 Pro, 64-bit
    Thread Starter
       #3

    ricardobohner said:
    I think it is possible to create a batch file that does the job but I wonder why you are not using the date on the destination file: Serverbackup.tar. Are you aware that the file would be overwriten whenever there is a new backup?
    Yes, but it was just a test.
    I found out how to do it. Just need to set the correct filename

    Code:
    cd Onedrive\Apps\plesk-backup\supportforum.be\backup_1909080119.tar_
    copy /B/Y *.tar + *.tar* D:\Onedrive\serverbackup.tar
      My Computer


 

  Related Discussions
Our Sites
Site Links
About Us
Windows 10 Forums is an independent web site and has not been authorized, sponsored, or otherwise approved by Microsoft Corporation. "Windows 10" and related materials are trademarks of Microsoft Corp.

Designer Media Ltd
All times are GMT -5. The time now is 19:19.
Find Us




Windows 10 Forums