Skip to content

Instantly share code, notes, and snippets.

@ChrisMcKee
Created August 8, 2013 09:29
Show Gist options
  • Save ChrisMcKee/6183155 to your computer and use it in GitHub Desktop.
Save ChrisMcKee/6183155 to your computer and use it in GitHub Desktop.
Archive SQL backups in CMD / DOS
@echo off
set SAVESTAMP=%DATE:/=-%@%TIME::=-%
@echo on
7z a -t7z %SAVESTAMP%.7z *.sql
forfiles /P "X:\DROPBOX\Dropbox\MySqlBackups" /S /M *.sql /D "-1" /C "cmd /c del @PATH"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment