Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Perforce save a local copy of opened file

Tags:

perforce

I have checked out few files on the perforce client. I can get the list of those files by command 'p4 opened' It gives path in the form of //depot/... like I want to know how this can be converted to path on the local path(I mean client path) So that i can create a batch file to backup those just before end of the Day Thanks In advance Uday

like image 963
Uday Avatar asked Nov 29 '22 07:11

Uday


1 Answers

This batch script can zip files into individual change list.

for /F "tokens=1,5,6 delims=# " %%a IN ('p4 opened') do for /F "tokens=3" %%j IN ('p4 where %%a') do zip %%b%%c %%j

It will create files like this:

change571620.zip
change673450.zip
change723098.zip
defaultchange.zip
like image 114
avhacker Avatar answered Dec 01 '22 22:12

avhacker