How to Sync to Specific Folder Using Command Line in Perforce

How to Sync to Specific Folder Using Command Line in Perforce

Suppose I have mapped my depot to client workspace as c:/perforce/project but now

I want to sync all the files present in c:/perforce/project/fold1/fold2 folder.

How can we do it, as the command p4 sync takes only file names and not folder.

1 Answer

Say the depot path is //depot/project/...

From the command line, do p4 sync //depot/project/fold1/fold2/...

(the "..." tells Perforce you want that folder and everything under it).

From P4V, right-click on the folder and choose "Get Latest Revision". It will only pull in the folder and everything underneath it.

5

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Sarah Jenkins
Author

Sarah Jenkins

Sarah Jenkins is a veteran tech journalist with over 12 years of experience covering artificial intelligence, mobile innovations, and digital ethics. Her insights have appeared in leading technology publications worldwide.