Batch to compress .Bak files using Winrar

0

At a certain time of the day, the backup of my database is generated, which has a .Bak extension. What I try to do is an archvivo bat which will be executed as a scheduled windows task at a certain time of day to perform the compression of the .bak file What I need help with is the script that will be in the .bat file to have the file compressed in that same location with the same name in the .bak file which may vary since it has the date and time of the file in the name.

In the examples that I found on the web, they always put the name of the rar file that they are generating and that is what I want to avoid since there may be more than one file in the location of the bakups which would cause the rewrite of the RAR file.

ra to d: \ backups \ example.rar d: \ backups \ example.bak

Any suggestions are welcome !!

    
asked by Oscar Gomez 20.11.2018 в 18:30
source

0 answers