I read one other post here that I can download a file from the Perforce depot into a local disk without a client workspace. To extend that further, I need to download all files (text & binary) from a depot dir into my local disk. Is this the correct p4 command to do that?
p4 print //depot/dir1/...
I have a few questions:
- Will it download all sub directories as well as files from //depot/dir1/... or files only?
- Will it keep the original names of the files that will be downloaded?
- Where are the files located on the local disk given no local path is specified?
I'm using the p4api.net library. Will this code do it?
public void GetFiles(string DepotFilePath)
{
P4Command cmd = new P4Command( _repository, "print", true,
String.Format( "{0}/...", DepotFilePath ));
results = cmd.Run();
if (results.Success)
{
//do something here
}
}
I'm not sure where in the local disk it will dump the files into?
Thank you for your help in advance.

p4 printwill output the content onto the standard output (see the excellent manual). Therefore, to answer your questions in order://depot/path/to/file#5 - edit change 430530 (text), followed by the content of that particular file.If you really don't want to create a client workspace for your task (why?), then you'd have to do something like the following:
p4 files(manual)p4 printfor each filep4 printto a file on the local disk, adhering to the directory structure in the depot.