[p4] Recursive add on windows problems

Brad Holt brad.holt at autodesk.com
Wed Aug 23 15:03:44 PDT 2006


This one will probably sound basic, but it is giving me problems.

I have a pile of about 500,000 files that need to be added to a new
server.  Many of these have special characters, and when I try to add
them with "dir /s /b /a-d | p4 -x add", they happily get added to a
pending changelist.  However, upon trying to submit, I get a "File
Cannot be found" error and the submission fails.  I believe this could
be happening because the special characters get dereferenced into an
ASCII approximation in the "dir" call, and so upon adding, the
file/folder names in the 'pending changelist' = 'the filenames in the
dir call' <> 'what's actually on the machine'.

So does anyone know of a scriptable way to do this.  I reckon something
that would let me add files without having to list them would work.
However, I can not think of a way to do this recursively in Windows
batch.  "p4 add //..." would be nice but "..." only works to reference
files already in the depot.  "p4 ad * */* */*/* etc. did not work past
the first folder as far as I could tell.

The P4Win would ddo the job, but I'd rather script something up as using
the UI with that many files is painful.

Thanks all.

-brad



More information about the perforce-user mailing list