Reply To: How to handle files without an extension in Vcs Package…?

Product Compare Forums Multi-Edit Support How to handle files without an extension in Vcs Package…? Reply To: How to handle files without an extension in Vcs Package…?

#5101
deleyd
Participant

Here’s an idea. We make a small modification to Multi-Edit and add a new Alias (or Metacommand) called <DEXT> that’s (Dot EXT) and then instead of
[code:328u1wor]"<FILE>.<EXT>"[/code:328u1wor]
we use
[code:328u1wor]"<FILE><DEXT>"[/code:328u1wor]
Our <DEXT> will add a dot if there is an extention, else if there’s no filename extention it will add nothing.

Now we just need to make the change to Multi-Edit.
In the Multi-Edit\src folder make a copy of file MeTools.s name it MeToolsTEST.s

Edit file MeToolsTEST.s, find macro TranslateCmdline, and in that macro find the switch statement and
[code:328u1wor]case "EXT" :
if ( UseLFN ) {
TStr = Get_Extension( LName );
}
else {
TStr = Get_Extension( SName );
}
break;[/code:328u1wor]

Add a new case statement following this one:
[code:328u1wor]case "DEXT" :
if ( UseLFN ) {
TStr = Get_Extension( LName );
}
else {
TStr = Get_Extension( SName );
}
if (TStr != "") { TStr = "." + TStr; }
break;[/code:328u1wor]

Then recompile MeToolsTEST.s, and you may need to then also do a START -> PROGRAMS -> Multi-Edit -> Rebuild Macro Library

Play with that. I haven’t tested it to see if it actually works.