dot in filename issue with new backup policy

Here's the place for discussion related to coding in FreeCAD, C++ or Python. Design, interfaces and structures.
Forum rules
Be nice to others! Respect the FreeCAD code of conduct!
User avatar
adrianinsaval
Veteran
Posts: 5553
Joined: Thu Apr 05, 2018 5:15 pm

Re: dot in filename issue with new backup policy

Post by adrianinsaval »

What about having -- before the date? I don't think you would manually save a file with a name like that and I doubt it will cause trouble with any software, uwestoehr has problems with his company's software with the current naming method, is it truly that hard to help him out? Not for the companies that may eventually use FreeCAD but for someone that already uses it?
chrisb
Veteran
Posts: 54280
Joined: Tue Mar 17, 2015 9:14 am

Re: dot in filename issue with new backup policy

Post by chrisb »

plgarcia wrote: Mon Mar 23, 2020 8:39 pm Chris If I understand well you are against this change right.
Correct, I'm against having any charcter besides the aforementioned in filenames. I would appreciate though a bigger change, where user defined placeholders can be used, similar to the export filename in Path workbench's postprocessor. Such augmentation should satisfy uwestoehr's request as well, but it sure is a major change.
A Sketcher Lecture with in-depth information is available in English, auf Deutsch, en français, en español.
User avatar
uwestoehr
Veteran
Posts: 4961
Joined: Sun Jan 27, 2019 3:21 am
Location: Germany
Contact:

Re: dot in filename issue with new backup policy

Post by uwestoehr »

chrisb wrote: Mon Mar 23, 2020 4:31 pm I hate using special characters in filenames.
Hmm, why do we then have parentheses in the default filenames for new meshes created using the mesh WB?

I still don't understand why you are insisting in using a dot. There are plenty of chars available that can be used instead and the functionality would be the same.

I will be quiet now since the arguments are exchanged. Maybe someone from the main developers like Yorik or Werner could make a decision?
chrisb
Veteran
Posts: 54280
Joined: Tue Mar 17, 2015 9:14 am

Re: dot in filename issue with new backup policy

Post by chrisb »

uwestoehr wrote: Mon Mar 23, 2020 11:18 pm Hmm, why do we then have parentheses in the default filenames for new meshes created using the mesh WB?
That doesn't make anything better.
I still don't understand why you are insisting in using a dot. There are plenty of chars available that can be used instead and the functionality would be the same.
I didn't.
A Sketcher Lecture with in-depth information is available in English, auf Deutsch, en français, en español.
wmayer
Founder
Posts: 20317
Joined: Thu Feb 19, 2009 10:32 am
Contact:

Re: dot in filename issue with new backup policy

Post by wmayer »

chrisb wrote: Mon Mar 23, 2020 11:31 pm
uwestoehr wrote: Mon Mar 23, 2020 11:18 pm Hmm, why do we then have parentheses in the default filenames for new meshes created using the mesh WB?
That doesn't make anything better.
When creating a mesh from a part shape then the label of the mesh is of this form: <ShapeLabel>(Meshed)
Now when selecting the mesh and using the mesh export function the suggested file name is of the form <ShapeLabel>(Meshed).extension
The user is still able to override the suggested file name.
plgarcia
Posts: 310
Joined: Wed Jun 17, 2015 9:47 pm
Location: Near Paris (France)

Re: dot in filename issue with new backup policy

Post by plgarcia »

I make clear why I choose the dot as separator once more.
The name of the archive and the file must be identical if we remove the 2 last extensions. I will check this is properly implemented I think one control may miss.

This is a simple criteria, whatever character has been included in the base-name of the project. This works always, this is simple.
Note that the format of the second extension can be changed along time by the user. I cannot therefore know what is has been in the past, and identifying the 2 last extensions in the condition is easy.
If we use another character allowed in the filenames may introduce confusion as I cannot know what is the "extension" like added.

This "extension" could be indemnified as the content of the last parenthesis.

I am thinking also that it could be identified as everything after the last occurrence of a character as log as this character is not used then forbidden in the extension. This could be the _ or the -. But the - is a very common way separating date and time.

If you think of one character (or set of characters like -- or __ or _TS_) not exotic that we could forbid in the extension that could be implemented easily without completely changing the structure of the code.

Make a decision and tell me.

Regards
plgarcia
Posts: 310
Joined: Wed Jun 17, 2015 9:47 pm
Location: Near Paris (France)

Re: dot in filename issue with new backup policy

Post by plgarcia »

Please Chris or wmayer tell me what you want me to do?
Post Reply