sachinpkale
sachinpkale

Reputation: 999

Perforce: list all the files in current directory but not from subdirectories

In Perforce, I want to list all the files in the current directory but the result should not include the files from the subdirectories.

For example, if I have,

//depot/X/first.c  
//depot/X/second.c  
//depot/Y/third.c  
//depot/Z/fourth.c

The result of the command, when run for //depot/X, would contain first.c and second.c only.

The command,

p4 files //depot/X/...  

will list all the files so it is of no use.

I tried with other wildcards like *, but couldn't find an answer.

Upvotes: 3

Views: 11705

Answers (2)

Tuoyu
Tuoyu

Reputation: 81

I think the question is: How to list all files and directories in specified directory not including the contents from sub directories.

And the command

p4 files //xxx/xxxx/"*"
p4 files //xxx/xxxx/'*'
p4 files //xxx/xxxx/* 

These commands will just list the files in directory, but lost the sub directories.

If you want to get all sub directories name, you could use the p4 dirs

p4 dirs //xxx/xxxx/*

Then the sub directories will be printed in the screen.

Upvotes: 3

jgritty
jgritty

Reputation: 11935

Normally, the command would be p4 files //depot/X/*, however, it seems in your case you are using the csh shell. In that case, the * wildcard has to be quoted, e.g. p4 files //depot/X/'*'.

Upvotes: 2

Related Questions