In a list of textfiles I need to replace a token with the name of the file.
Is there an easy way to do this? The prefered tool for me would be notepad++, but grep, python, powershell or other other ways are also ok. I work on windows.
Example:
filenames
contact.aspx
default.aspx
content first file
Hallo <%= Html.Resource("Title") %>
content second file
Whats up <%= Html.Resource("Title") %>
The required result is:
first file
Hallo <%= Resource.contact_aspx.Title %>
second file
Whats up <%= Resource.default_aspx.Title %>
I dont need the complete solution here: just the part that lets me use the filename in a replace statement would get me started.