I have a bunch of files that I have in line 7(using notepad++) this:
And I want to replace that word with the filename without the file extension .yml (the filename have just the dot from the extension, example: filename.yml), so when replaced it looks like this:
Can anyone help me since I have no knowledge with find/replace variables on notepad++?
name: tower name: house name: building name: marcus name: johnAnswer1:
You can achieve this relatively simply by <a href="http://www.autohotkey.com" rel="nofollow noreferrer">AutoHotKey</a>. It allows you sending keystrokes/mouseclicks etc. so you can quickly perform actions which are else done manually. In this case, you can automate these manual steps by sending appropriate keypresses in Notepad++. Please learn how to do the following using keyboard and then simply send those keys via AHK.<ol><li>menu
Copy to Clipboard>
Current Filename to Clipboard(<kbd>F10</kbd>, then arrows)</li> <li>Open <strong>Find/Replace</strong> dialog (<kbd>Ctrl+H</kbd>)</li> <li><strong>Find what</strong>: type
filename</li> <li><strong>Replace with</strong>: send <kbd>ctrl+V</kbd> (paste) into this field so filename from clipboard gets pasted</li> <li>send 4 backspaces to delete file extension and dot (if your extension has 3 characters)</li> <li>press <strong>Replace All</strong> button (<kbd>Alt+A</kbd>)</li> </ol>
Please see <a href="https://stackoverflow.com/questions/22220666/in-notepad-change-tab-size-instantly/22880354#22880354" rel="nofollow">this answer</a> for some details of AutoHotKey use with Notepad++.