Perforce sync all files with a specific extension to revision #0 [closed]

The syntax you want is:

p4 sync //....psd#none

(#none is the idiomatic way to specify "no revision", but #0 and @0 should also work.)

The revision specifier always goes immediately after the file path, never in the middle of it. Providing a path like //root/...#0/*.psd should have gotten you an error like Invalid revision number '0/*.psd'.

Note that if your server is case-sensitive (the default if it's hosted on a Unix platform), all parts of a file path are case-sensitive, so you may need to do both .psd and .PSD to cover all your bases.

The following variations might work, with caveats:

  • p4 sync //.../*.psd#0 -- this works, but is slower due to the double wildcard. You almost never want to do .../* in place of simply ....
  • p4 sync //root/.../*.psd#0 -- this should also work, but only in a depot that is literally called root. The "root" of the repository (i.e. the parent "directory" of all depots) is just //. If you ran a command against a //root/... path and there is no root depot, you should have gotten an error like //root/... - must refer to client 'yourclient', which is the error you get if you try to reference a specific domain (//something) that isn't a depot and isn't your current client.