Replace file name with text from same file.

A place to try and solve your RegEx problems.
Post Reply
Coshette
Posts: 1
Joined: Wed Oct 19, 2016 1:51 pm

Replace file name with text from same file.

Post by Coshette »

I have about 3000 html files that I would like to rename to the <title>file title</title>.

I can find the file name within the file with a Reg Ex: search pattern, but do not know if or how the program would then use this file name to 'save as' the file with the new searched variable.

Example:

Reg Ex: <title>(.*)</title> = file name

Then save the file in a different directory with the new file name.

Thanks if anyone has a solution.
User avatar
DigitalVolcano
Site Admin
Posts: 1376
Joined: Thu Jun 09, 2011 10:04 am

Re: Replace file name with text from same file.

Post by DigitalVolcano »

You can replace with the file name by selecting 'Replace with file name' in the drop down box next to the replace text box.

In the 'Output to files' section you can select 'Create files in new folder'

Hope this helps!
Post Reply