tags:

views:

333

answers:

2

I would like to know how much disk space a directory is going to consume before I bring it over from the Perforce server. I don't see any way to do this other than getting the files and looking at the size of the directory in a file manager. This, of course, defeats the purpose.

Is there a way to get file size info from Perforce without actually getting the files?

+1  A: 

p4 fstat

Graham Lee
I can get the size of a file that way, but I guess I was really more interested in getting the size of a directory (I'll edit my question). Something like "p4 dstat".
raven
total = 0foreach file in mydir do p4 fstat file total += size of filedone:-)
Graham Lee
+4  A: 

I don't know how I missed this command, but here's how you do it:

p4 sizes -s //depot/directory/...

raven