views:

55

answers:

2

Hello I'm trying to get Perforce syntax to obtain (for example using "fstat") list of files only in given folder (depot), without rubbish from all sub-folders. But I was not able to find anything in the docs, nothing related when using Google, even experimenting with ".", ".../." etc. lead me to nowhere...

Is that because it's not possible at all? I can't understand why... Isn't that a performance back hit?!

Thanks in advance. Seb.

+2  A: 

A single '*' expands to "all files in this directory" in p4 (no subdirectories). So, e.g. at a Unix shell prompt, in the correct directory in a perforce client:

$ p4 fstat '*'

You need to quote or escape the * to avoid the shell expanding it, of course;-).

Alex Martelli
What if I want to specify it on the Prforce, so to list files from "//depot/Folder1/Folderx/" ? Shall I first go around and map depot folder to working folder, change PWD and THEN use "fstat"? I hoped there is more straightforward solution... (BTW: I'm working with p4.Net).
LiLol
Did you try `p4 fstat '//depot/Folder1/Folderx/*'` ?
Commodore Jaeger
Yeah, as first try. Only to get this esoteric exception: "Error running Perforce command!". And got it with many combinations of ".", "...", directory with or without slash etc. Only "/..." executed properly...
LiLol
A: 

Ah finally.

It was partially my own fault - I'd set ExceptionLevel to ExceptionOnBothErrorsAndWarnings... I needed full debug... Unfortunately:

  1. When exception was raised - there was no Response object created, and I could not read the warning message, which wasn't part of the exception message (or object).
  2. Using '//depot/Folder1/Folderx/*' thrown warning "No such file(s)!" - what is not something that developer might expect... As not being any special case...

It seems that I have still much to learn on the Perforce though :-/

Thank you guys for your posting. Seb.

LiLol