Announcement

Collapse
No announcement yet.

Overwriting Old Files

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • Overwriting Old Files

    This has bitten me a couple times in the past with installers but never remembered to post about it. Happened again today so i figured i would ask.

    I have a small installer that simply installs some files to the source directory. I updated the installer to include a new version of a file. In SF, the Overwrite Settings in the File Properties is set to the default 'Overwrite if existing file is older'.

    The existing file in my folder is 5/26/2021. The new file to be installed is 8/4/2021 which is clearly newer.

    When i run the exe, the file does not get replaced and remains 5/26/2021.

    The only way i can get it to update is to set the overwrite option to 'Always overwrite existing file'. Any reason why it won't update unless its set this way?
    Matt Leach
    GalacTek Corp.
    www.galactek.com

  • #2
    The existing file in my folder is 5/26/2021. The new file to be installed is 8/4/2021 which is clearly newer.
    Not necessarily. From the product documentation:

    The relative newness of the file is determined by the version resource information built into the file. If the file does not contain version information, then file's date and time will be used as the criteria.
    So, if there is a file version embedded in the existing file, then this information will be used during the comparison, not the file date: If both files have the same version information, they are considered the same, and the date will not be checked at all. If you have an executable, always update (increase) the file version of the product. If it is a document, image, video, etc., use the file date to control the overwrite logic.

    Ulrich

    Comment


    • #3
      Thank you for the clarification.
      Matt Leach
      GalacTek Corp.
      www.galactek.com

      Comment

      Working...
      X
      😀
      🥰
      🤢
      😎
      😡
      👍
      👎