With the growth of metabolomics research, more and more studies are involving large numbers of samples, which necessitate the processing of samples in batches. Across different batches, we often observe different characteristics of features generated from the same metabolite. Traditional preprocessing methods treat all samples as a single group, which makes it necessary to use larger tolerance levels in order to allow for between-batch differences. Such an approach is sub-optimal, as it can result in errors in the alignment of peaks. We develop a new approach that process the data in a hierarchical manner first within batch and then between batch. Different parameter settings can be used for within-batch and between-batch quantification and alignments. The method is implemented on the existing workflow of the apLCMS package. Analyzing data with multiple batches, both generated from standardized plasma samples and from real biological studies, the new method result in feature matrices with higher consistency. The method can be useful for large studies involving multiple batches.