Yixing Liu
Yixing Liu

Reputation: 2429

Perforce: how can I rename a directory name

My p4 stream is //ui/main and I have many files under //ui/main/src/. How can I rename src to be something else like apps?

I tried

p4 edit src/

I got this error:

src - files(s) not on client

The following doesn't work either:

p4 move src/... apps/...

I am using Linux so I am seeking a commandline solution. Thanks!

Upvotes: 5

Views: 4536

Answers (1)

Samwise
Samwise

Reputation: 71574

p4 edit src/...
p4 move src/... apps/...

Note that your stream needs to have apps/... in it! E.g. this will work fine for any path you want to put in this stream:

Stream: //ui/main
Paths:
    share ...

but if your stream looks like this:

Stream: //ui/main
Paths:
    share src/...

then the apps/... path doesn't exist in your stream and you won't be able to move things into it. (To fix this, add apps/... to your Paths before you do the move.)

Upvotes: 6

Related Questions