Jump to content


how to retrieve all folder and their files from Perforce using P4java

p4java java perforce folders files

  • Please log in to reply
3 replies to this topic

#1 MgMh

MgMh

    Newbie

  • Members
  • Pip
  • 3 posts

Posted 24 February 2015 - 08:34 PM

hi everyone :)
I'm newbie in this forum hope that i find knowledge it seems that there are a lot of experts....

I'm assigned to a new task that demand a development of an assistant that connect to perforce and retrieve all folders and their appropriate files but the problem is that the P4JAVA API is a little bit difficult to understand
i just made a connection and don't know what to do after :(
please guys some advice.

and a final request can anyone of you make to us a some videos or a training session (I'll pay for that) I'm really interested
cuz this task will boost my careers.

cheers

#2 P4Shimada

P4Shimada

    Advanced Member

  • Members
  • PipPipPip
  • 831 posts

Posted 24 February 2015 - 09:18 PM

Hi,

Sorry to hear that you are having difficulty with the P4Java API.  Is there a particular type of training that you would like? For example, is it mostly P4Java training?

As reference, you may have already seen these, but here are our existing public training videos:

http://www.perforce....urces/tutorials

When you mention "connect to perforce and retrieve all folders and their appropriate files" do you mean you are trying to do a 'p4 sync' on certain files? There is an actual 'p4 sync' files example in the Common Usage Patterns for P4Java article listed below.

Also, the Perforce Workshop and our Knowledge Base has articles and examples of P4Java.

REFERENCES (P4Java)

- Perforce Workshop
https://swarm.worksh...orce/p4javademo

- Get Shelved Files with P4Java
http://answers.perfo...rticles/KB/8281

- Common Usage Patterns for P4Java (‘p4 sync’ example)
http://answers.perfo...rticles/KB/2605

-  P4Java IServer Properties and Usage Options
http://answers.perfo...rticles/KB/2624

- Creating pending changelists with P4API.NET
http://answers.perfo...ticles/KB/6577/

#3 ThatGuy

ThatGuy

    Advanced Member

  • Members
  • PipPipPip
  • 33 posts

Posted 25 February 2015 - 12:41 AM

Hi MgMh,

When you say to retrieve all folders and their appropriate files do you mean syncing files from a repository? If so you should look up how to run the p4 sync command from the P4JAVA API.

The links sent by P4Shimada are very relevant but if syncing files is what you are after here are a few examples.

http://tricks2trick....p4java-example/

http://razgulyaev.bl...-temporary.html


Definitely read the API Tutorial to get a good grounding otherwise you will find yourself in a pickle when things get more complex.
http://www.perforce..../01_p4java.html

Thanks,

Tunga.
Certified P4.

#4 MgMh

MgMh

    Newbie

  • Members
  • Pip
  • 3 posts

Posted 25 February 2015 - 08:55 AM

thanks everybody this is very helpful i will use the p4 sync and tell if there is news :)

    wish luck





Also tagged with one or more of these keywords: p4java, java, perforce, folders, files

0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users