By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
449,264 Members | 1,760 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 449,264 IT Pros & Developers. It's quick & easy.

Post Build Events

P: n/a
Hi there,

I'm calling xcopy in a post build event to copy some runtime requirements to
the TargetDir of the application I am working on. Problem is that I only
seem to be able to have 9 calls to xcopy. If I make any more calls than the
9, it will fail. I can call the same command 9 times, and the 10th will
fail, or I can call 10 different ones and it will fail on the tenth.
Basically it doesn't matter how I mix it up, but if I take a bunch of xcopy
commands that copy different files to the same location, no matter which
order and despite the fact each command works by itself or when 9 or less
commands are executed, if I go to 10 commands it fails. :-(

I tried to reproduce this in a new C++ app, copying "C:\test.txt" to the
TargetDir, but it seems I can call xcopy as many times as I like and it will
work in the test app.

What could be the problem in my application?

Regards,
David.
Nov 17 '05 #1
Share this Question
Share on Google+
3 Replies


P: n/a
Actually, I can reproduce this in a test app. Seems not to be related to the
number of lines, so I investigated the number of macros, and it also seems
not to be directly related. What it appears to be is a limitation on the
number of characters in the post build event? Seems to be the number of
characters post macro expansion.

For example, this will fail with a project at C:\...\Desktop\Test

xcopy "$(ProjectDir)..\..\..\..\test me.txt" "$(TargetDir)" /R /Q /Y
xcopy "$(ProjectDir)..\..\..\..\test me.txt" "$(TargetDir)" /R /Q /Y
xcopy "$(ProjectDir)..\..\..\..\test me.txt" "$(TargetDir)" /R /Q /Y
xcopy "$(ProjectDir)..\..\..\..\test me.txt" "$(TargetDir)" /R /Q /Y
xcopy "$(ProjectDir)..\..\..\..\test me.txt" "$(TargetDir)" /R /Q /Y
xcopy "$(ProjectDir)..\..\..\..\test me.txt" "$(TargetDir)" /R /Q /Y
xcopy "$(ProjectDir)..\..\..\..\test me.txt" "$(TargetDir)" /R /Q /Y
xcopy "$(ProjectDir)..\..\..\..\test me.txt" "$(TargetDir)" /R /Q /Y
xcopy "$(ProjectDir)..\..\..\..\test me.txt" "$(TargetDir)" /R /Q /Y
xcopy "$(ProjectDir)..\..\..\..\test me.txt" "$(TargetDir)" /R /Q /Y
xcopy "$(ProjectDir)..\..\..\..\test me.txt" "$(TargetDir)" /R /Q /Y
xcopy "$(ProjectDir)..\..\..\..\test me.txt" "$(TargetDir)" /R /Q /Y
xcopy "$(ProjectDir)..\..\..\..\test me.txt" "$(TargetDir)" /R /Q /Y
xcopy "$(ProjectDir)..\..\..\..\test me.txt" "$(TargetDir)" /R /Q /Y
xcopy "$(ProjectDir)..\..\..\..\test me.txt" "$(TargetDir)" /R /Q /Y

But will work with the same project at C:\Test.

If I add more lines to the project in the shallower path, then it will also
fail...

Performing Post-Build Event...
'x..\..\..\..\test' is not recognized as an internal or external command,
operable program or batch file.

Is this a known issue?

Thanks,
David.

"David Battams" <da******@hotmail.com> wrote in message
news:eR**************@TK2MSFTNGP09.phx.gbl...
Hi there,

I'm calling xcopy in a post build event to copy some runtime requirements to the TargetDir of the application I am working on. Problem is that I only
seem to be able to have 9 calls to xcopy. If I make any more calls than the 9, it will fail. I can call the same command 9 times, and the 10th will
fail, or I can call 10 different ones and it will fail on the tenth.
Basically it doesn't matter how I mix it up, but if I take a bunch of xcopy commands that copy different files to the same location, no matter which
order and despite the fact each command works by itself or when 9 or less
commands are executed, if I go to 10 commands it fails. :-(

I tried to reproduce this in a new C++ app, copying "C:\test.txt" to the
TargetDir, but it seems I can call xcopy as many times as I like and it will work in the test app.

What could be the problem in my application?

Regards,
David.

Nov 17 '05 #2

P: n/a
> From: "David Battams" <da******@hotmail.com>

Actually, I can reproduce this in a test app. Seems not to be related to the number of lines, so I investigated the number of macros, and it also seems
not to be directly related. What it appears to be is a limitation on the
number of characters in the post build event? Seems to be the number of
characters post macro expansion.

...

Is this a known issue?


This is a bug in the 2003 version. We fixed it for our next release.

Thanks for the report.
--
Tarek Madkour, Visual C++ Team
This posting is provided AS IS with no warranties, and confers no rights.

Nov 17 '05 #3

P: n/a
Thanks for the information! :-)

""Tarek Madkour [MSFT]"" <ta****@online.microsoft.com> wrote in message
news:qd**************@cpmsftngxa07.phx.gbl...
From: "David Battams" <da******@hotmail.com>

Actually, I can reproduce this in a test app. Seems not to be related to

the
number of lines, so I investigated the number of macros, and it also seems not to be directly related. What it appears to be is a limitation on the
number of characters in the post build event? Seems to be the number of
characters post macro expansion.

...

Is this a known issue?


This is a bug in the 2003 version. We fixed it for our next release.

Thanks for the report.
--
Tarek Madkour, Visual C++ Team
This posting is provided AS IS with no warranties, and confers no rights.

Nov 17 '05 #4

This discussion thread is closed

Replies have been disabled for this discussion.