Running a function in QGIS (example - "native:geometrysmooth"
) on a single shapefile, I can copy the 'Python Command' once setup and replicate this to run in the Python Console for a single run.
If I run this code with variations for multiple shapefiles (have hundreds with different names), the processing only generates for the last entry (processing.run) (i.e only one is generates).
Is there a simple way to batch these out, currently with hard link input and output folders (to C drive)?
Note: I have been able to rename each code string input and output to the corresponding shapefile.
Example (copy and paste all together and try to run as together, as copying and pasting each is extremely inefficient).
processing.run("native:smoothgeometry", {'INPUT':'C:\\_Work\\QGIS_Learning\\1_Batch_Exports\\5_Polylines\\1_Original\\1_Polyline_1.shp','ITERATIONS':2,'OFFSET':0.25,'MAX_ANGLE':180,'OUTPUT':'C:\\_Work\\QGIS_Learning\\1_Maps_Exports\\5_Polylines\\2_Simplified\\2_Polyline_1_Simplified.shp'})
processing.run("native:smoothgeometry", {'INPUT':'C:\\_Work\\QGIS_Learning\\1_Batch_Exports\\5_Polylines\\1_Original\\1_Polyline_7.shp','ITERATIONS':2,'OFFSET':0.25,'MAX_ANGLE':180,'OUTPUT':'C:\\_Work\\QGIS_Learning\\1_Maps_Exports\\5_Polylines\\2_Simplified\\2_Polyline_7_Simplified.shp'})
etc.