Not overwrite the files in upgrade mode

Comments

2 comments

  • Avatar
    John123

    Hi jesus, I have tried it but <excludefiles> is not working in my case.

         <folderList>
            <folder> 
              <description>Program Files</description>
              <destination>${installdir}</destination>
                <name>programfiles</name>
                <platforms>all</platforms>
                <distributionFileList>
                 <distributionDirectory allowWildcards="1">
                <origin>D:/InstallBuilder/SampleProject</origin>                               <excludeFiles>D:/InstallBuilder/SampleProject/config/configure.properties</excludeFiles>
            </distributionDirectory>
            </distributionFileList>
           </folder>
    
    <folder>
         <description>Program Files</description>
          <destination>${installdir}</destination>
          <name>programfiles</name>
          <platforms>all</platforms>
          <distributionFileList>
          <distributionFile>
             <origin>D:/InstallBuilder/SampleProject/config/configure.properties</origin>
         </distributionFile>
         </distributionFileList>
        <ruleEvaluationLogic>and</ruleEvaluationLogic>
        <ruleList>
           <compareText text="${project.installationType}" logic="does_not_equal" value="upgrade"/>
        </ruleList>
        </folder>
     </folderList>
    

    is any thing wrong here

  • Avatar
    jesus

    Could you check if the below works for you?

    ...
    <distributionFileList>
        <distributionDirectory allowWildcards="1">
            <origin>D:/InstallBuilder/SampleProject</origin>
            <onPackingFilterList>
                <fileNameFilter logic="does_not_match" pattern="*/config/configure.properties"/>
            </onPackingFilterList>
        </distributionDirectory>
    </distributionFileList>
    ...
    

Please sign in to leave a comment.