[p4] Recursive add on windows problems
Shawn Hladky
p4shawn at gmail.com
Wed Aug 23 16:19:54 PDT 2006
The following one-liner should list the opened files that are missing on the
client:
for /f "tokens=2,*" %i in ('p4 fstat -Ro //... ^|findstr /c:"...
clientFile"') do @dir /b "%j" 2>nul 1>nul & if errorlevel 1 echo %j
Annoyingly, p4 diff -sa doesn't seem to work.
Not sure what you want to do to fix them, but if the list is small then you
can deal w/ that manually.
On 8/23/06, Brad Holt <brad.holt at autodesk.com> wrote:
>
> 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
>
> _______________________________________________
> perforce-user mailing list - perforce-user at perforce.com
> http://maillist.perforce.com/mailman/listinfo/perforce-user
>
More information about the perforce-user
mailing list