[p4] P4.NET running print command

Patrick Bennett patrick.bennett at inin.com
Sat Mar 24 06:38:08 PST 2007


You should be using p4 print -q -o (filename) (depot file)
This will put the content of the depot file into the filename specified 
by -o.
Without the -o, p4 print displays the contents to stdout.

Chris Stoy wrote:
> Hey all,
>
> Maybe this is a dumb question, but how to I get the contents of a file in
> the depot using P4.NET?  Normally, using "p4 print" returns the file
> contents, but none of the results I get back from P4.NET are giving me
> that.  All I get are tagged descriptions of the file, but not the contents.
> Am I missing something?
>
> Here is the code I'm using (in C#):
>
>
>             P4Connection p4c = new P4Connection();
>             p4c.Port = "****";
>             p4c.User = "****";
>             p4c.Password = "*****";
>             p4c.Connect();
>             P4RecordSet result = p4c.Run("print", "//depot-Art/image.jpg");
>             p4c.Disconnect();
>
> I can't find anywhere in the P4RecordSet where the file contents are
> stored.  Any ideas?
>
> Thanks,
>
> Chris.
> _______________________________________________
> perforce-user mailing list  -  perforce-user at perforce.com
> http://maillist.perforce.com/mailman/listinfo/perforce-user
>
>   


-- 

*Patrick Bennett* | Software Engineer
phone & fax +1.317.715.8302 | patrick.bennett at inin.com
 
*Interactive Intelligence Inc.*
Deliberately Innovative
www.inin.com <http://www.inin.com/>



More information about the perforce-user mailing list