I really like the new PowerShell (7.2.4, in my case). However, I have to run certain programs that require a specific syntax:
$$ <prog> <ending>
<prog> is the name of the program, e.g. test, while the argument could be anything, e.g. this. The tricky part is that the program internally searches for a file that is called
like test_this.cfg, rejecting its own name (test), the underscore and the file extension (.cfg). So the correct call would be:
$$ test this
This program was originally designed for a Linux environment, where the executable itself has no file extension on its own and therefore this call works. But now that I am on Windows, it has to be an .exe file, otherwise it is not being executed (Windows then asks what to do with this file). The PowerShell call then looks like this (the .\ are being added automatically by PowerShell):
$$ .\test this
but internally, the .exe extension seems to be there still, because the programm tells me that it cannot find a file called test.exe_this.cfg (of course it cannot, the name is test_this.cfg). Is there any way the PowerShell can simply ignore the .exe extension of the program, just like the default Windows CommandLine does?
Unfortunately, I'm not the program developer, so I cannot extend its functionalities to understand such patterns as well.