Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save zapirkon/a9b0d214d4b0d76e3aed00102e0d0905 to your computer and use it in GitHub Desktop.
Save zapirkon/a9b0d214d4b0d76e3aed00102e0d0905 to your computer and use it in GitHub Desktop.
@title backing up default vs repo folder
@set _git=%userprofile%\source\repos
@set _prefix=vs_
@set _pat=%~dp0
@for /f "delims=" %%# in ('powershell get-date -format "{yyyyMMdd}"') do @set _date=%%#
@for /f "delims=" %%# in ('powershell get-date -format "{HHmmss}"') do @set _time=%%#
@md %_date%
@set _pat=%_pat%\%_date%
@for /f "tokens=*" %%G in ('dir /b /ad "%_git%"') do git -C "%_git%\%%G" bundle create "%_pat%\%_prefix%%%G-%_date%-%_time%.bundle" --all
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment