Hello, import std.stdio; import std.process; import std.string; void main() { string debPackage="dmd-2"; int dmdVersion=2; auto path = format("%s/usr/{bin,lib,src/phobos%d,share/man}",debPackage,dmdVersion); system("mkdir -p " ~ path); } The result: dmd-2/usr/{bin,lib,src it should be dmd-2/usr/bin dmd-2/usr/lib dmd-2/usr/src Kubuntu 8.0.4