Skip to content
  • There are no suggestions because the search field is empty.

Removing Unwanted Text from Files

If you've ever wanted to remove text from files in batch, follow these steps!

 

In this example, I want to remove "Jane Doe_" from the shapefiles names:

2026-04-23_11-51-34

 

In the unzipped folder, right click and select "Open Terminal".


2026-04-23_11-40-36

 

Type in the following Code, replacing "Jane Doe_" with whatever text you wish to remove:  

Get-ChildItem * | Rename-Item -NewName { $_.Name -replace "Jane Doe_", "" }

 

You will have to use the backspace key to be able to change out the "Jane Doe_" text and put your own in.  Just remember to type in ",""} after you do so.

2026-04-23_12-09-01

Hit the "Enter" key.

 

In this example, "_2026" and "_poly" have all been removed for a more simplistic file name to be imported into a display.

2026-04-23_12-12-30-1