Okay, I really have no idea what I'm doing here, if I posted in the correct subforum, etc., but I have a problem that I can't seem to eradicate. Feel free to scold me.
The simplistic console language (if you will; I have no idea if it has an official name or not or if it is an actual mainstream embedded language) that N++ and NppExec uses is quite useful when editing my files and making macros and such. The $(CURRENT_DIRECTORY) and $(FULL_FILE_PATH) variables work perfectly, as expected, but have a few limitations I can see. I have not found any other variable that uses the short file name format instead of the long file name format that the above variables use.
This is my problem: I use Borland's (the old Borland, not the new company under the same name that got bought out) Turbo C++ 3.0 application. I absolutely love it; it includes a fully-functional IDE that I can successfully run in NTVDM, a C/C++ compiler with the standard header library, and a huge truckload of examples. The only bad part is that because it is nearly 10 years old, it only supports short file names in input/output areas. This means that the directory/file name must be less than eight letters long, else it is shortened to six letters then a ~# (# being the file/directory from a list of files/directories with those six letters in the first of their names) appending it, followed by the extension (three characters max, else it uses the first character followed by the ~# token again). Long file names don't use the ~3 token at all.
What I want to know is: is it possible to convert long file names to short file names in NppExec, or is there a variable that allows you to fetch the short file name of the current directory/file name/full file path? If not, is there an outside application or plugin for N++ that will allow me to do this?
Thanks in advance for any feedback, as all is appreciated.
Oh. Never mind.
I kind of answered my own question with the following batch file:
"tcc -n%~s2 %~s1"
I can launch this from NppExec like this:
cmd.exe /c "tcc -n%~s2 %~s1"
I guess this post wasn't really needed…
Okay, I apparently overestimated batch. Just running it like:
cmd.exe "$(CURRENT_DIRECTORY)" "$(FULL_CURRENT_PATH)" /k "tcc -n%~s2 %~s1"
didn't work at all. Saving the batch to a file, putting it in my C:\Program Files\TurboC\BIN directory, then running it with arguments from NppExec worked.