Author Topic: Films not saving properly if period is used in file name.  (Read 1518 times)

Offline Devil 505

  • Aces High CM Staff
  • Plutonium Member
  • *******
  • Posts: 8773
Films not saving properly if period is used in file name.
« on: February 23, 2019, 07:56:21 PM »
I attempted to save my films from today's scenario with the following format "NR 2.1" (Frame 2, sortie 1) The next sortie was "NR 2.2" and so on.

Only one film was saved in the folder though. It was called "NR 2" What was in that recording was the final sortie. So apparently, the file name drops anything after the period and overwrites a file with the same name.

I attempted to duplicate this offline and was given an error window for invalid file name with the second test save. The first saved without an error but the file name also dropped the ".1" portion. It was "test 1.2" which caused the error.

I then repeated the same test in SEA2 just like in scenario. No error message occurred, and "Test 2.2" overwrote "Test 2.1" and can be seen in the folder as "Test 2"
Kommando Nowotny

FlyKommando.com

Offline Bizman

  • Plutonium Member
  • *******
  • Posts: 9517
Re: Films not saving properly if period is used in file name.
« Reply #1 on: February 24, 2019, 03:12:23 AM »
Although using a period in file names has become possible, it's still not recommended: https://docs.microsoft.com/en-us/windows/desktop/FileIO/naming-a-file.
Quote
Use a period to separate the base file name from the extension in the name of a directory or file.
Not a new thing, I learned that in the early eighties and it was already old knowledge back then.

If you use a period, you'll be changing the file extension, in this case from .ahf (AH Film File) to .1 (1 file) which would not have any connection to any program to run such filetype.

I don't understand why "Test 2.2" overwrote "Test 2.1" since the names differ. If you find strange extensions in your films folder, you can always rename them to "Film.ahf" to fix compatibility with AHFilm.
Quote from: BaldEagl, applies to myself, too
I've got an older system by today's standards that still runs the game well by my standards.

Kotisivuni

Offline Skuzzy

  • Support Member
  • Administrator
  • *****
  • Posts: 31462
      • HiTech Creations Home Page
Re: Films not saving properly if period is used in file name.
« Reply #2 on: February 27, 2019, 03:53:19 PM »
We probably should not allow a "." in the file name.  When  you do that Windows will assume the next group is the file extension and there you go.  It is not anything we have control over.  It is a Windows thing.
Roy "Skuzzy" Neese
support@hitechcreations.com

Offline Devil 505

  • Aces High CM Staff
  • Plutonium Member
  • *******
  • Posts: 8773
Re: Films not saving properly if period is used in file name.
« Reply #3 on: February 27, 2019, 04:34:55 PM »
Ok. Thanks.
Kommando Nowotny

FlyKommando.com

Offline 1stpar3

  • Gold Member
  • *****
  • Posts: 3693
Re: Films not saving properly if period is used in file name.
« Reply #4 on: March 01, 2019, 02:15:27 AM »
We probably should not allow a "." in the file name.  When  you do that Windows will assume the next group is the file extension and there you go.  It is not anything we have control over.  It is a Windows thing.
Oh, sure...announce retirement and wait till now for that tip! Payback for all the crap you put up with(from us)? Well played sir, well played! Eh if not...it should be! I couldnt have done it! Hope you have a thick skin, capable replacement trained well! He gonna need all the training he can get! On another note...he want drink around the "tripped over cable" incident :rofl
"Life is short,break the rules,forgive quickly,kiss slowly,love truly,laugh uncontrollably,and never regret anything that made you smile."  “The two most important days in your life are the day you are born and the day you find out why.”- Mark Twain

Offline ccvi

  • Gold Member
  • *****
  • Posts: 2074
      • http://www.carl-eike-hofmeister.de/
Re: Films not saving properly if period is used in file name.
« Reply #5 on: March 02, 2019, 05:56:05 PM »
Although using a period in file names has become possible, it's still not recommended: https://docs.microsoft.com/en-us/windows/desktop/FileIO/naming-a-file.  Not a new thing, I learned that in the early eighties and it was already old knowledge back then.

If you use a period, you'll be changing the file extension, in this case from .ahf (AH Film File) to .1 (1 file) which would not have any connection to any program to run such filetype.

Read carefully. It says the extension is separated by a period (what it means is that the extension is separated by the last period). It does not say that there can't be additional periods, except that the last character cannot be a period. It even explicitly suggests to use a period as the first character of a filename (which is needed for compatibility with hidden files on some other OSs).

What you learned in the 80s was relevant for FAT partitions. It only matters if you're still using FAT partitions, and for software that still assumes that the limits of FAT partitions exist.

What really sucks is filenames with spaces and some special characters, which require escaping and/or quotes when accessed from a shell.

Offline Bizman

  • Plutonium Member
  • *******
  • Posts: 9517
Re: Films not saving properly if period is used in file name.
« Reply #6 on: March 03, 2019, 02:53:16 AM »
As I said, the naming conventions have become more free than what they used to be. As the Microsoft article says "Use a period to separate the base file name from the extension in the name of a directory or file", which means the last period just as you said.

The AH film naming system seems to allow for changing the extension similarly to any Windows naming process when choosing "All files" instead of the default in the Save As window.

As a side note, allowing multiple periods in file names has enabled malware spreaders to fool people by naming executable files using .pdf or .doc or other familiar endings in between, supposing the user has the common extensions hidden as the Windows default setting. So if you get an e-mail attachment named something like "temptingfile.pdf.exe" or "reallyfunnypic.jpg.exe", don't open it!
Quote from: BaldEagl, applies to myself, too
I've got an older system by today's standards that still runs the game well by my standards.

Kotisivuni