Created
October 1, 2012 23:09
-
-
Save djg/3815097 to your computer and use it in GitHub Desktop.
Perforce Backup
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@ECHO OFF | |
SETLOCAL EnableDelayedExpansion | |
SET CL=%1 | |
IF "_%CL%_"=="__" SET CL=default | |
SET "r=%__CD__%" | |
FOR /F "tokens=1,5,6 delims=# " %%a IN ('p4 opened -c %CL%') DO ( | |
FOR /F "tokens=3" %%j IN ('p4 where %%a') DO ( | |
SET p=%%j | |
7z u -tzip %%b%%c !p:%r%=! > nul | |
) | |
) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment