diff --git a/nibio_preprocessing/distance_filtering_dem_based_in_folder.py b/nibio_preprocessing/distance_filtering_dem_based_in_folder.py
new file mode 100644
index 0000000000000000000000000000000000000000..e47d2dc0c5fc14c0ced7745916c9d382fe142123
--- /dev/null
+++ b/nibio_preprocessing/distance_filtering_dem_based_in_folder.py
@@ -0,0 +1,56 @@
+import argparse
+import os
+from glob import glob
+from tqdm import tqdm
+from joblib import Parallel, delayed
+
+from nibio_preprocessing.distance_filtering_dem_based import DistanceFilteringDemBased  # Import your existing class
+
+def process_file(las_file, DISTANCE, OUTPUT_FOLDER, VERBOSE):
+    if VERBOSE:
+        print(f"Processing {las_file}...")
+    
+    # Determine the output file path
+    filename = os.path.basename(las_file)
+    filename = filename.replace('.las', '_filtered.las')
+    output_las_file = os.path.join(OUTPUT_FOLDER, filename)
+    
+    # Run the distance filtering
+    distance_filtering = DistanceFilteringDemBased(
+        distance=DISTANCE, 
+        input_las_file_path=las_file, 
+        output_las_file_path=output_las_file,
+        verbose=VERBOSE
+    )
+    distance_filtering.run()
+    
+    if VERBOSE:
+        print(f"Filtered {las_file} and saved to {output_las_file}")
+
+if __name__ == '__main__':
+    # Command-line argument parser
+    parser = argparse.ArgumentParser(description='Batch processing of distance filtering based on DEM')
+    parser.add_argument('-d', '--distance', help='Distance in meters e.g. 0.5', default=0.5, required=False, type=float)
+    parser.add_argument('-i', '--input_folder', help='Input folder containing LAS files', required=True)
+    parser.add_argument('-o', '--output_folder', help='Output folder to save filtered LAS files', required=True)
+    parser.add_argument('-v', '--verbose', action='store_true', help="Print information about the process")
+    
+    args = vars(parser.parse_args())
+    
+    DISTANCE = args['distance']
+    INPUT_FOLDER = args['input_folder']
+    OUTPUT_FOLDER = args['output_folder']
+    VERBOSE = args['verbose']
+    
+    # Make sure output folder exists
+    if not os.path.exists(OUTPUT_FOLDER):
+        os.makedirs(OUTPUT_FOLDER)
+    
+    # List all LAS files in the input folder
+    las_files = glob(os.path.join(INPUT_FOLDER, '*.las'))
+    
+    # Run parallel processing using joblib
+    Parallel(n_jobs=-1)(delayed(process_file)(las_file, DISTANCE, OUTPUT_FOLDER, VERBOSE) for las_file in tqdm(las_files))
+    
+    if VERBOSE:
+        print("Batch processing complete.")