How to revert all open files in perforce

perforceversion control

I know how to revert a single opened file. However sometimes I hit some issues where I have to revert all files attached in a single changelist or revert all open pending files (default CL or assigned CL) in a client. Is there any way to do that? I tried p4 revert -c <changelist> where has multiple pending files. It didn't work for me. It works if I mention ALL the file names.

Best Answer

I bet you just need to provide a filespec, try p4 revert -c <changelist> //...