Run a command for all files in a directory
Looping over glob.glob to build files is unneeded.
You shouldn't need to chdir if you change the glob to xml/*.xml
filearchiver_cmdline can be changed to use str.join and a comprehension.


Note: untested

import glob
import os

dir_name = "../pack"

if not os.path.exists(dir_name):
    os.mkdir(dir_name)

os.system(" ".join(
    ["archiver.exe"]
    + ["xml\\" + f for f in glob.glob("xml/*.xml")]
))