Wordfile association by file name rather than file extension

Wordfile association by file name rather than file extension

3
NewbieNewbie
3

    Feb 20, 2017#1

    I deal with *.sql files for SQL Server and DB2 on the i5 (AS400). The existing scripts for both end with the .sql extension, but the scripts have an identifier to show what database type it's for. The file names follow this format: *-db2i.sql or *-sqlserver.sql. Is there a way that I can have separate wordfiles based on the format of the file name rather than simply on the file extension?

    My overarching goal is to be able to separate all of smart templates that I've created. Right now I just have all of them under "Global", but the list is getting rather long. It would be great if I could separate these templates based on the associated wordfile.

    Thank you very much for your input. It's greatly appreciated.
    Ken Sturgeon

    6,687586
    Grand MasterGrand Master
    6,687586

      Feb 21, 2017#2

      Wordfiles can be associated with files by file extensions using File Extensions = or alternatively by file names using File Names =. But the file names must be specified completely and wildcards as well as a space in file name is not possible in currently latest UE v24.00.0.45 and all former versions. For that reason the File Names = option is most likely of no help for you.

      It is nevertheless possible to use one (or two) wordfiles for syntax highlighting SQL files and more interesting for you multiple template files. It looks like two wordfiles is not really necessary, but two templates files would be helpful.

      I would use in your case most likely a project/workspace with project setting Optional template file being configured and if needed also Optional wordfile. There need no files/folders added to project which would make it a simple workspace. But you could use also Add folder and add the parent folder of all *-db2i.sql or all *-sqlserver.sql files with appropriate filter setting to add automatically recursively to project all files matching the wildcard pattern as defined in filter option.

      The optional template file and optional wordfile are loaded whenever this project/workspace is loaded making it possible to edit *-db2i.sql or *-sqlserver.sql files with different settings than the other type of *.sql files opened when project/workspace is not opened at the moment.

      You might enable configuration setting Save project information for use on multiple systems at Advanced - Settings/Configuration - File Handling - Advanced and uncheck Close all files when opening or switching projects at Advanced - Settings/Configuration - File Handling - Miscellaneous before creating project/workspace.

      Also possible would be using two layouts and defined the two different sets of templates as layout templates. Switching the layout for either editing *-db2i.sql files or for editing *-sqlserver.sql files switches also the template file associated with the layout.
      Best regards from an UC/UE/UES for Windows user from Austria