1

I need to rename a shapefile.

Is it ok to simply use Windows Explorer to manually rename each of the three related files that comprise the shapefile?

I am using QGIS.

4
  • This related post may be helpful: gis.stackexchange.com/q/126378/8104
    – Aaron
    Feb 26, 2017 at 21:01
  • 2
    If you're making these changes from the OS, you're not really "using QGIS". If you get interrupted in the middle of your process, you'll make a mess, which is why ArcGIS allows renaming from the UI. Are you sure QGIS doesn't as well? See also gis.stackexchange.com/questions/126378/…
    – Vince
    Feb 26, 2017 at 21:01
  • 2
    It might be quicker to export (save as) from QGIS with the new name then (optionally) delete the old one. Less chance of 'fat fingers' inserting a double space or transposed letters; the consequences of slightly misnaming one of the many files are dire, so I suggest use QGIS to export the files to ensure all components are named the same prior to extension. Feb 26, 2017 at 22:47
  • 1
    Little known tip: select all files associated with a shapefile in Windows Explorer, press F2 (rename shortcut) then rename one of them. they'll all rename to the same, keeping their original extension.
    – Fezter
    Feb 27, 2017 at 2:01

2 Answers 2

4

Yes, it is - if you are sure there are no more files associated with it (e.g. .prj file). The associated files have always the same name (prefix).

2

It is safest and best practice to rename shapefiles in an automated fashion to avoid errors in any of the associated files. You can use the Windows command line ren function and a wildcard * to easily rename shapefiles and all their associated files. Keep in mind this will rename the original. For example:

ren C:\path\to\your\shapefile* renamed_shapefile*

Alternatively, you can copy your shapefile and all the associated files to a new location using the copy function:

copy C:\path\to\your\shapefile* C:\path\to\another\directory\renamed_shapefile*

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.