Find/Replace but Increment Value

html, notepad++, replace

Solution

Look into the Column Editor feature within Notepad++. You can do a block select on the area you want to increment and then give it a starting/ending range and you're all set.

I was in a similar situation recently. I did a little bit of regular expression search/replace to get my filenames into my "default" format with some padded "000" where I wanted my incrementing to start. After that, I used Shift+ALT to block select the 000s and used the editor to do the rest of the work.

Problem

I have an .HTML file that has many photos attached to it for displaying a photo gallery. I'm replacing old photos with new ones, and I'm thinking there must be a more intelligent way than simply copying and pasting repetitive file names. I would love to be able to replace and increment a file name on each replace, starting at a base file name of my choosing. For example... ``` ...images/69thStreet010.jpg ...images/69thStreet011.jpg ...images/69thStreet012.jpg ``` Basically performing a CTRL+F and REPLACE '69thStreet010.jpg' with... ``` ...images/xyz001.jpg ...images/xyz002.jpg ...images/xyz003.jpg ``` And so on until I want it to stop. Anyone here have any suggestions? Thanks a lot! UPDATE: I should also add, I'm using Notepad++ to edit my files.

Original source