Now, the script should be able to correctly save the files in the specified folder and use only the file name, not the entire path, as the output file name.
Note: YOUR\\VaMX\\AddonPackages needs to be modified to your actual directory location, with \\ being the necessary path syntax. YOUR\\VaMX\\EXTRACTATOMS needs to be modified to your actual directory location, with \\ being the necessary path syntax.