Whilst building my ant scripts for perforce updates, had to figure out if people added new files to the local directory but forgot to add them to the Perforce depot.
Here's how to programmatically find that out, from the current directory down:
On Windows:
dir /s /b /a-D | p4 -x - fstat 1>NUL:
On Unix:
find . -type f | p4 -x - fstat 1>/dev/null
(please note that in both cases it is DASH X space DASH space FSTAT, not DASH X space DASH FSTAT)
The command swallows the proper files in the depot (hence redirection to null) and will spit out only the STDERR stream with the ones that are not in depot, in the format:
<full file path>\file1 - no such file(s).
<full file path>\file2 - no such file(s).
Here's how to programmatically find that out, from the current directory down:
On Windows:
dir /s /b /a-D | p4 -x - fstat 1>NUL:
On Unix:
find . -type f | p4 -x - fstat 1>/dev/null
(please note that in both cases it is DASH X space DASH space FSTAT, not DASH X space DASH FSTAT)
The command swallows the proper files in the depot (hence redirection to null) and will spit out only the STDERR stream with the ones that are not in depot, in the format:
<full file path>\file1 - no such file(s).
<full file path>\file2 - no such file(s).