Bat script to backup a folder and run an .exe after it's finished

Mar 18, 2018
4
0
10
I've been looking around trying to find/write a script for this but I'm just confusing myself so I'll just ask instead.

To be specific I want it to backup a folder(so that it replaces the one from the last use of the script) and then run the specified .exe
 
Solution
I do a full system image, across all my systems...every night.
Macrium Reflect. It does not care if something is still open. It takes a snapshot of the system at the start, and proceeeds on.

Full + Incremental backups, every night starting at 1AM.
A Full, and then 14 days of Incremental. I could return the system to any state it was in for the last 2 weeks. Or retrieve a particular copy of a file as it existed last Tuesday.
More detail here: http://www.tomshardware.com/forum/id-3383768/backup-situation-home.html


For stuff like this, you break it down into segments.

1. Delete the old data
2. Copy from Source folder to Target folder.
3. Run the .exe

Then, you put all 3 procedures into one sequence.

But...what is the use case for this? While a batch file would work, there are probably other things or applications that would work better.
 


I was hoping for someone to help me make the script itself as I find my ability/knowledge regarding it to be poor, as for other solutions to make it happen I'm all ears.

As to why? I want it to backup my browser data before launching it, just paranoid about losing it.
 
All the major browsers have a function to export your profile, on demand.
There is little reason to do that every time you open the browser.

But...you should be doing routine backups of your whole system anyway.
Making backups of "only the browser profile" irrelevant.


An application like FreeFileSync can do a backup of a designated folder on a schedule.
https://www.freefilesync.org/manual.php?topic=schedule-a-batch-job
 


Except those are manual only(afaik) and don't seem to include extensions(which this method would), at the very least for the browser I'm using.

While I would love to have a full C copy, running a regular backup on 200gb versus only 1 when that specific data would be the only to be basically unrecoverable I see little need for it.

I have tried several file sync and backup tools but they all fail for the same reason. Namely: They can't backup a file that is in use, and with my browser being left open 24/7(mostly due to how long it takes to relaunch all of my tabs, only relaunching when it starts to chug after 3+ weeks) a scheduled backup would be very unreliable.
 
I do a full system image, across all my systems...every night.
Macrium Reflect. It does not care if something is still open. It takes a snapshot of the system at the start, and proceeeds on.

Full + Incremental backups, every night starting at 1AM.
A Full, and then 14 days of Incremental. I could return the system to any state it was in for the last 2 weeks. Or retrieve a particular copy of a file as it existed last Tuesday.
More detail here: http://www.tomshardware.com/forum/id-3383768/backup-situation-home.html
 
Solution


Not exactly what I was hoping for but hey, I came with a problem and leave with a solution. Thank you very much.
 

TRENDING THREADS