Sublime Forum

After build change results file


After I compile the file resulting from the compile (example.amx) it saved in the same location like source (example.pwn) (same folder). How can i change the location for the compilation result (example.amx).
Folder befor compile

Folder after compile



How that would be done would depend on whatever the tool is that’s doing the compiling, so we can’t give any explicit advice. Generally speaking if you can provide the name of the output file in the command that does the compile, then you could probably specify the output file with a path to get it to go somewhere else.



This is build settings where pawncc.exe is the compiler.

	"cmd": ["pawncc.exe", "-i includes", "$file", "-;+", "-d3"],
	"path": "C:/pawno"

Source code name: example.pwn
Output after i compile: example.amx



If your run pawncc with no arguments, it will give you help text on how to use it and what arguments it takes (this is common for software that you run from a terminal in this fashion). That help indicates that pawncc support the -o option to tells it where to put the output file.

Assuming that you wanted your output files to go into a folder named output in the same folder as the input file, you could add the following argument to your cmd list:


That says that the output file should be named the same as the current file, but in a folder named output in whatever folder the current file is sitting in.

Alternatively if you have a set location in mind, you could just hardcode that path directly, though you will need to end the path in ${file_base_name} because this argument is expecting you to provide the name of the file it should be creating.