Using copy on command line in custom build step?

Sysprogs forums Forums VisualGDB Using copy on command line in custom build step?

This topic contains 2 replies, has 2 voices, and was last updated by  iklask 3 weeks, 3 days ago.

Viewing 3 posts - 1 through 3 (of 3 total)
  • Author
    Posts
  • #32577

    iklask
    Participant

    During my build process the final output binary is merged with an encrypted header bin. I used to have a .bat file that would do the command:

    copy /b header.bin + compiled.bin output.bin

    I’d like to move this (and a few other post build commands) to the Custom Build Steps of VisualGDB. All my commands seem to work except for this copy command. It always returns with a -1. I’ve tried just a simple file copy without merging files and it also returns with a -1. Does the copy command on windows not work in the “Run command” action of custom build steps? I know there is a “transfer a single file” action which works great… however it cannot merge/append two files into one like the windows copy command can.

    #32588

    support
    Keymaster

    Hi,

    This happens because the copy command is not a separate executable, but is rather a built-in command of cmd.exe. Hence, you can launch it as follows:

    File name: cmd.exe
    Arguments: /c copy /b <…>

    #32590

    iklask
    Participant

    Ah I understand now thank you!

Viewing 3 posts - 1 through 3 (of 3 total)

You must be logged in to reply to this topic.