Tapatalk

Usage of date modifier on version backup

Usage of date modifier on version backup

20
Basic UserBasic User
20

    Mar 28, 2012#1

    Hi all;

    I spent a month evaluating UE Portable 17. I liked it, but Rhapdog and others urged me to look at UEStudio instead, since I'm looking for an editor for C++ coding work. I confirmed with IDM that I could install it on two different computers (non-concurrently), so that alleviates much of my need for portability, so I thought I'd give it a shot with the new release.

    One thing that worked in UE, but for some reason is not working in UEStudio, is backups. I configured UEStudio with the same settings I had used in UE:

    BackupOptions.PNG (18.32KiB)


    When using UE17 with the settings there, backup files were created as I would expect, taking the form:

    2012-02-29-11-53-ue.btm
    2012-02-29-11-54-ue.btm
    2012-02-29-12-06-ue.btm

    However, in UEStudio, the versioned backups don't seem to work. I can set "Backup Files on Save" to append .BAK, and I see that .BAK files are created in the backup directory when I manually save, but versioned backups do nothing.

    Is anyone else seeing this? I've tried with pretty much every permutation I can think of.

    2362
    MasterMaster
    2362

      Mar 28, 2012#2

      I used the versioned backups in 11.20.0.1006 without incident for several months before installing the pre-release of version 12.

      I never had an issue with any version of UEStudio with versioned backups. Perhaps there is something else going on here...

      I have been using the string: $b$p$n($3c)$e
      for my versioned backups.

      When I changed this to the string you had displayed: $Y(c,m)-$m(c,m)-$d(c,m)-$n.$e
      the backups quit working. The c and the m you have in parenthesis are modifiers, and only one can exist at a time.

      The ? next to the format is unclear on how to use these modifiers, and the modifiers aren't even listed in UE's help system.

      I was able to get your desired functionality to work by changing it to the following:

      Code: Select all

      $Ym_$m_$d_$n$e
      or

      Code: Select all

      $Ym.$m.$d.$n$e
      You should not have a dot between $n and $e, as the extension includes the dot. The modifier should not be in parenthesis, and can have either c or m, according to your needs. Adding the modifier to more than one of the codes rendered the backup not being made. Using dashes between the codes also renders the code useless, and the backup will not be made.

      I successfully did it with underscores and dots as the delimiter between the date's numbers.

      Hope this helps.

      20
      Basic UserBasic User
      20

        Mar 28, 2012#3

        rhapdog wrote:When I changed this to the string you had displayed: $Y(c,m)-$m(c,m)-$d(c,m)-$n.$e
        the backups quit working. The c and the m you have in parenthesis are modifiers, and only one can exist at a time.
        Hmm. That was copied from the UE install. Of course, I can't run the UE install anymore (demo expired) so I cannot check.
        rhapdog wrote:The ? next to the format is unclear on how to use these modifiers, and the modifiers aren't even listed in UE's help system.
        I think the online ? help on UE was different than UES.
        rhapdog wrote:I was able to get your desired functionality to work by changing it to the following:

        Code: Select all

        $Ym_$m_$d_$n$e
        or

        Code: Select all

        $Ym.$m.$d.$n$e
        Hmpf. Those didn't work either.

        I started from scratch, and I see to have found it. The key was the $b parameter for backup path. I don't know why it's needed, since there's already a backup path specified. I don't know if it is due to UE versus UES, or portable app versus installed app, but if I don't specify "$b\", it doesn't write the versioned files to the correct directory. Hmpf. Well, it works now. Thanks.

        6,685587
        Grand MasterGrand Master
        6,685587

          Mar 28, 2012#4

          Addition to what rhapdog already explained.

          Using UES v11.20.0.1010 (last hotfix version of UES v11.20) the format strings $Yc-$m-$d-$H-$M-$n$e and $Ym-$m-$d-$H-$M-$n$e work too.

          What means creation and last modification date?

          Let's say you create a new file and save it the first time as Test.txt at 2012-03-28 19:26:32. Test.txt has now identical creation and modification date stamps.

          Next you modify the file and wait for at least 1 minute change before saving Test.txt again. There is no counter, so you have to wait for at least a minute change or no new version backup file is created. The creation date of Test.txt remains 2012-03-28 19:26:32. The last modification date changes to 2012-03-28 19:27:16.

          The version backup with format string $Yc-$m-$d-$H-$M-$n$e creates a file with name 2012-03-28-19-27-Test.txt with creation date 2012-03-28 19:27:16 and last modification date set by UEStudio to 2012-03-28 19:26:32.

          You see that c modifier references the creation date of the version backup file which is equal the last modification date of the original file. So c references the date on saving the original file resulting in creating this version backup file. The last modification date of the version backup file is set to the time the file contents of this file was really modified last time.

          The version backup with format string $Ym-$m-$d-$H-$M-$n$e creates a file with name 2012-03-28-19-26-Test.txt with creation date 2012-03-28 19:27:16 and last modification date set by UEStudio to 2012-03-28 19:26:32. So m references the date the file contents of this version backup file were last time modified which is the date as the original file has had as last modification time just before saving it.

          It is not possible to mix creation and modification time and therefore c OR m can be used only once on first date / time placeholder variable.

          I use both, UEStudio and UltraEdit for Windows and version backup as well as help (button ? and HTML help page) are identical.

          Usually just $b should be enough because the backup directory ends always with a backslash. It is enough on my Windows XP SP3 x86 with UE v111.20.0.1010 as well as with UE v18.00.0.1029. Even if the path is entered manually without a backslash at the end, UEStudio v11.20.0.1010 as well as UltraEdit v18.00.0.1029 append a backslash on pressing button OK or Apply. So if you need $b\ it would be interesting if the displayed backup directory path in same dialog is without a backslash at end.

          20
          Basic UserBasic User
          20

            Mar 29, 2012#5

            Mofi wrote:Using UES v11.20.0.1010 (last hotfix version of UES v11.20) the format strings $Yc-$m-$d-$H-$M-$n$e and $Ym-$m-$d-$H-$M-$n$e work too.
            Hi Mofi!

            Thanks for the writeup. My previous tests were with UE Portable 17, and now I'm trying UEStudio 11 (11.20) installed, so differences could be due to the version, the UltraEdit Portable vs UEStudio, I don't know.

            I found in UE that using the counter generated another file with an actual count. If I tried to save the same file in the same minute, even with a counter, the second backup would be a .BAK file rather than the yyyy-mm-dd format. In real world terms, it doesn't mean much, since there aren't a lot of reasons to need a backup more often than every 60 seconds.
            Mofi wrote:Usually just $b should be enough because the backup directory ends always with a backslash.
            I'm not sure if I need it or not, but it works as is. What surprised me was I don't recall even using $b when I set up the UE Portable. Of course, that was a month ago, and I can't check any longer, so I can't be certain.