Technical Issues - File Open/Save Options

After some years a coating department may accumulate hundreds (thousands?) of designs. Most users prefer FILM Archive Mode, while others stay with the historic FILM Mode (evolved from utilizing 5 punch cards to describe a film design). One can take advantage of both modes by enabling FILM Archive and checking Augment File...Open/Save in File.. Configuration.. Preferences. Actually, even with Augment unchecked, shortcut keys allow Archive users to load and save FILM components. This is especially useful for quickly switching graph axes and range.


16-bit FTG-style file dialog

Windows 3.1 versions of FilmStar utilized the file dialog illustrated above. A Description field compensated for the limitation of 8.3 file names in 16-bit Windows. A separate List Files dialog displayed all file names and descriptions in a scrolling list.

In Windows 95 the above dialog evolved into the version shown at the right. While long file names were now supported, the 50 character description field was retained for compatibility.


32-bit FTG-style file dialog

In 2011 some users still rely on 8.3 file names, perhaps using serial numbers to identify designs. We also find that some users continue to rely on FILM Mode (separate files for design components) mode rather than FILM Archive Mode. In various cases the Description field remains crucial and cannot be eliminated.


Windows common file dialog

In 2002 FTG added common Windows file open and save dialogs. This had advantages, such as sorting by date and searching. For example, entering file name '*bbar*' lists files containing 'bbar'. Note, however, that there is no Description field. We assumed that new users would rely on long file names and not bother with description fields.

For technical reasons the FTG-style dialog was eliminated in 2010. This created a problem for users who had never switched to long file names. To compensating for the loss of the Description field FTG added a new Configuration Preferences option: Display and save file descriptions. This activates an input box after a Save As command.



File List dialog

Enabling file descriptions adds the File List dialog shown above. The dialog was updated (07 Mar 11) to include a new View menu with Find commands and a new File Date sort.

NTFS File Properties provide an alternative for FILM Archive, Spectra and INDEX n,k files. This has advantages for users who share designs. It requires the Database option (Facility License) while file descriptions (File List dialog) do not.

A new Auto prompt option (File..Configuration..Directories) prompts users to edit NTFS File Properties during Save As.

Advanced users: New BASIC Functions FilePropsGet and FilePropsSet provide means to transfer descriptions to NTFS File Properties (Facility License required). Sample code is given below. Note the statement USERS SHOULD BACK-UP FILES BEFORE PROCEEDING.

The FileMaker Pro FilmStar Database provides powerful and flexible means to keep track of FILM Archive designs and spectra.


' FilePropsAdd.bas for FilmStar DESIGN
' Copyright 2011 FTG Software Associates
' ****************************************************
'    Warning: Save modified program with new name!!!
' ****************************************************
' This program adds FILM Archive file description and graph
' titles to NTFS File Properties. USERS SHOULD BACK-UP FILES
Option Explicit
Const DesPath$ = "C:\Winfilm\Designs"
Sub Main
    On Error Resume Next
    Dim k%, titl As String * 50, desc As String*50, file$
    Dim d1$, d2$, d3$, d4$, d5$, d6$, RO As Boolean
    If MsgBox("This program adds NTFS file properties To FILM Archive" _
       & vbLf & "files in " & DesPath$, vbOkCancel + vbInformation, _
       "NTFS File Utility") = vbCancel Then End
    file$ = Dir(DesPath$ & "\*.faw")
    StatusLabel "Busy - please wait"
        k = k + 1
        If k > 1 Then file$ = Dir
        If file$ = "" Then Exit Do
        If LCase$(Left$(file$, 4)) <> "work" Then
            FilePropsGet DesPath$ & "\" & file$, d1$, d2$, d3$, _
               d4$, d5$, d6$, RO
            ' Skip files with NTFS properties; skip read-only files
            If d2$ = "" And Not RO Then
                Open DesPath$ & "\" & file$ For Binary As #1
                StringGet 1, desc$
                ' Skip 'Work' files
                If LCase(Left$(desc$, 9)) <> "work file" Then
                    Get #1, 125, titl$  ' get graph axes title
                    If Trim$(titl$) <> "" Or Trim$(desc$)<> "" Then _
                    If Not FilePropsSet(Trim$(titl$), Trim$(desc$), _
                       DesPath$ & "\" & file$) Then End
                End If
            End If
            Close #1
        End If
    StatusLabel "Task completed"
End Sub
Sub StringGet(ByVal kFN, s$, Optional ByVal j&)
    Dim k&
    k& = Len(s$)
    ReDim a(k) As Byte
    If j = 0 Then Get #kFN, , a() Else Get #kFN, j, a()
    s$ = StrConv(a(), vbUnicode)
End Sub

 Back to Technical Issues