[GIS] Calculating file name with field calculator

attribute-tablefield-calculatorqgis

Is it possible to calculate the file name in an attribute table?

My shapefile has a name like "cities.shp". In this shapefile I want to have a attribute "cities").

Best Answer

Sorry for that stupid question! I did find an very easy way to do what I aked in this thread. Just use the QGis processing tool and the SAGA "merge vector layers" tool. The merged shape file has a column (called "Layer") filled with the shape file names.