How do I download files from perforce to a location other than a workspace?
Solution 1
As far as I am aware you cannot sync files from a Perforce depot without using a workspace since this is the way it tracks what version of files you have in your workspace and also where to put them on your local machine (as well as a few other things). I'm not sure I entirely understand your problem but if what you need to do is get another copy of the file1.cs you have in the depot without removing the changes you have to it you can simply copy the changes to another location or shelve them and re-sync the file. The more complete and less dangerous solution is to create another workspace pointing to a different physical location on your machine but the same depot location. This explains how to create a workspace if you need it: http://www.perforce.com/perforce/doc.062/manuals/boilerplates/quickstart.html Make sure the 'Root' path is different to that of your current workspace, you can check what your current workspaces root is by going to the workspace tab in P4V and viewing it. Once you have created the new workspace create a new connection and select it then sync the file(s) you need.
Solution 2
I'm not sure what you really want to do, but you can get the contents of a file from the depot without using a workspace definition by using "p4 print". Example:
>p4 print -o fileName.cs //depot/path/to/fileName.cs
Comments
-
meetjaydeep almost 2 years
I want to get files from Perforce without putting them into a workspace.
E.g. I have made changes in 2 files.
file1.cs file2.cs
Now I want to build the project using updated file1.cs, so I want to get latest files except for file1.cs.
I thought I will get another local copy of project and build it.
-
meetjaydeep over 13 yearsThanks for reply. I will create another copy of local files.
-
jirassimok over 4 yearsThis seems like the beginning of a good answer. Are there other steps following this that let it solve the asker's question completely?
-
Chris Savoie over 4 yearsgood point, I'm not sure this really answers it at all. I was looking for ways to download individual files from perforce without having to map them and mistook this question as similar to that.