CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 3 of 3
  1. #1
    Join Date
    Oct 2010
    Posts
    10

    post build conditions

    Hi ive just started using build events so im not very good at it yet, ive managed to rename an assembly once compiled like this

    rename $(TargetFileName) $(TargetName).customextention

    which changes the extention from .exe/.dll to .customextention

    however once compiled and renamed, when i compile my solution without making changes to that project i get an error saying it cant rename a file that isnt there. so my question is how do i do something like this which doesnt work

    if Exists $(TargetFileName) rename $(TargetFileName) $(TargetName).customextention

  2. #2
    Join Date
    Oct 2010
    Posts
    10

    Re: post build conditions

    My error is because $(TargetName).customext already exists so what i actualy need to do is

    if exists $(TargetName).customext delete $(TargetName).customext

    so to ammend my question how do i do that?

  3. #3
    Join Date
    Mar 2007
    Posts
    90

    Re: post build conditions

    What about:
    Code:
    move /y $(TargetFileName) $(TargetName).customextention

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  





Click Here to Expand Forum to Full Width

Featured