Jump to content

To validate the given P4 root path is valid or not

P4Api P4command

  • Please log in to reply
1 reply to this topic

#1 SheikImran_7



  • Members
  • Pip
  • 1 posts

Posted 11 June 2020 - 07:23 AM

Hi All,

I have a P4 root path ex: //depot/DirA/DirB/DirC/DirD/ and I'd like to validate whether the given root path is exists in the repository. Is there any way I could validate it using P4Api or P4 command? either way am ok to use it.


#2 Sambwise


    Advanced Member

  • Members
  • PipPipPip
  • 1172 posts

Posted 18 June 2020 - 04:50 PM


p4 files -m1 //depot/DirA/DirB/DirC/DirD/...

to see if anything exists under that directory path.

If you want to exclude deleted files (i.e. you want to make sure there's at least one non-deleted file in that path), add the "-e" flag.

Also tagged with one or more of these keywords: P4Api, P4command

0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users