dot in filename issue with new backup policy
Forum rules
Be nice to others! Respect the FreeCAD code of conduct!
Be nice to others! Respect the FreeCAD code of conduct!
dot in filename issue with new backup policy
The new option to use the FCbak extension for backup files has a small but important issue:
It leads to filenames with 2 dots, e.g. "Filename.20200315-215654.FCBak". Some security and anti-malware programs (only on Windows I guess) will therefore trigger such files as potentially harmful, especially since also the FCBak extension is not known to those programs.
To overcome this, could the dot please be replaced by e.g. a hyphen: "Filename-20200315-215654.FCBak"
It leads to filenames with 2 dots, e.g. "Filename.20200315-215654.FCBak". Some security and anti-malware programs (only on Windows I guess) will therefore trigger such files as potentially harmful, especially since also the FCBak extension is not known to those programs.
To overcome this, could the dot please be replaced by e.g. a hyphen: "Filename-20200315-215654.FCBak"
Re: dot in filename issue with new backup policy
Alone you go faster. Together we go farther
Please mark thread [Solved]
Want to contribute back to FC? Checkout:
'good first issues' | Open TODOs and FIXMEs | How to Help FreeCAD | How to report Bugs
Please mark thread [Solved]
Want to contribute back to FC? Checkout:
'good first issues' | Open TODOs and FIXMEs | How to Help FreeCAD | How to report Bugs
Re: dot in filename issue with new backup policy
The point is that merged PRs don't appear in the normal forum view anymore.
However, I found the PR: https://forum.freecadweb.org/viewtopic. ... 35#p377135
and added there a note to continue here visibly for all developers.
Re: dot in filename issue with new backup policy
In fact what we can do is simply remove the . between the name and the date.
If somebody wants a - it can put it in the format what could be the default.
Tell me what you prefer either force a - instead of a . or move the separator in the format.
Regards
If somebody wants a - it can put it in the format what could be the default.
Tell me what you prefer either force a - instead of a . or move the separator in the format.
Regards
Re: dot in filename issue with new backup policy
OK I continue the analysis this week-end. To keep the number of archives we list the documents starting with the same name. I have to think a way to avoid confusions of the archives in this case. I often add a -1 -2 to a project name when I want to keep a version.
I take that this week-end.
Regards
I take that this week-end.
Regards
Re: dot in filename issue with new backup policy
New proposal
And what if we put the - between the date and the FCBak extension.
Eventially swap both FCBak-<the date>
Like that the part of the name before the . is alway what is to be compared in Backup policy.
And what if we put the - between the date and the FCBak extension.
Eventially swap both FCBak-<the date>
Like that the part of the name before the . is alway what is to be compared in Backup policy.
Re: dot in filename issue with new backup policy
I am happy with every solution as long as these 2 points are fulfilled:
- the filename has the suffix ".FCbak"
- there is only one dot in the filename and this the one before "FCbak"
Re: dot in filename issue with new backup policy
why not a format date-name.FCbak
with date like YYYYMMDD?
On old UNIX trick to have them ordered by date.
In this manner almost every filesystem will list them in chronological order.
Regards
Carlo D.
with date like YYYYMMDD?
On old UNIX trick to have them ordered by date.
In this manner almost every filesystem will list them in chronological order.
Regards
Carlo D.
GitHub page: https://github.com/onekk/freecad-doc.
- In deep articles on FreeCAD.
- Learning how to model with scripting.
- Various other stuffs.
Blog: https://okkmkblog.wordpress.com/
- In deep articles on FreeCAD.
- Learning how to model with scripting.
- Various other stuffs.
Blog: https://okkmkblog.wordpress.com/
Re: dot in filename issue with new backup policy
Your way would mix the files of the different projects saved in the same folder. That is why the name followed by the date is a better way sorting.
The backup policy is base on the date of the file so that whatever the logic of the naming of the backup they can be properly ordered to delete the eldest ones if too many.
But to identify the files I must be able to relate the backups to the project files and therefore to distinguish between the name of the file and the added part. The first . is the way, and it is working very fine.
If we just replace the . by - imagine 2 projects.
project.FCStd
project-2.FCStd
They backups would have the form
project-202003-182325.FCBak
project-2-202003-182325.FCBak
The first - cannot be the criteria if we do not want to confuse between the archives of the 2 projects.
That is why I would propose to add the date in the extension.
project.202003-182325-FCBak
or
project.FCBak-202003-182325
to find always the name before the first .
Regards
The backup policy is base on the date of the file so that whatever the logic of the naming of the backup they can be properly ordered to delete the eldest ones if too many.
But to identify the files I must be able to relate the backups to the project files and therefore to distinguish between the name of the file and the added part. The first . is the way, and it is working very fine.
If we just replace the . by - imagine 2 projects.
project.FCStd
project-2.FCStd
They backups would have the form
project-202003-182325.FCBak
project-2-202003-182325.FCBak
The first - cannot be the criteria if we do not want to confuse between the archives of the 2 projects.
That is why I would propose to add the date in the extension.
project.202003-182325-FCBak
or
project.FCBak-202003-182325
to find always the name before the first .
Regards