Rename .htm to .html
Rename .htm to .html
Hi,
Will there be any problem if I rename .htm files to .html? My developer has called .html files in the application; changing to .htm will mean changes in several files. It may be easier for me to make the change at Flare's end. One problem I will have is that the TOC will need to be redone. But apart from that, will there be any other problems? Is it safe for me to rename the files without causing too much damage?
Any thoughts on this would be appreciated.
Thanks.
Will there be any problem if I rename .htm files to .html? My developer has called .html files in the application; changing to .htm will mean changes in several files. It may be easier for me to make the change at Flare's end. One problem I will have is that the TOC will need to be redone. But apart from that, will there be any other problems? Is it safe for me to rename the files without causing too much damage?
Any thoughts on this would be appreciated.
Thanks.
Re: Rename .htm to .html
You can edit project files in the text editor and use a Find&Replace.
Topic file name can be changed in the DOS prompt that Windows offers.
The links to those topic files in other topics you can also change be a Find&Replace for "whole project'".
PROBLEM: Adding topics defaults to .htm again - you will have change that EVERY time.
Topic file name can be changed in the DOS prompt that Windows offers.
The links to those topic files in other topics you can also change be a Find&Replace for "whole project'".
PROBLEM: Adding topics defaults to .htm again - you will have change that EVERY time.
Inge____________________________
"I need input! - Have you got input?"
"I need input! - Have you got input?"
Re: Rename .htm to .html
I don't have Flare open at the moment to check, but I think there's someplace in the project where you can specify the file extension that's used at build time. It's so you can specify .aspx, for example, although I seem to recall an option to set it to .html. The option is probably either in the skin or the target.
Lisa
Eagles may soar, but weasels aren't sucked into jet engines.
Warning! Loose nut behind the keyboard.
-
- Propellus Maximus
- Posts: 1238
- Joined: Mon Feb 27, 2006 5:56 am
- Location: Melbourne, Australia
Re: Rename .htm to .html
Look in the target, on the Advanced tab, and there is a checkbox to "Use Custom file extensions for output". Just type in html - no dots, no quotes. This does not change your source file names, but just puts the extension in when the webhelp is generated.LTinker68 wrote:... there's someplace in the project where you can specify the file extension that's used at build time ...
Margaret Hassall - Melbourne
Re: Rename .htm to .html
Thanks everyone. I learnt something new today - did not know about custom file extensions during output generation.
Only thing is, that is an option during generation of Webhelp; and I am looking at CHM file generation. Looks like it will have to be manually done..?
Regards,
TeSol
Only thing is, that is an option during generation of Webhelp; and I am looking at CHM file generation. Looks like it will have to be manually done..?
Regards,
TeSol
-
- Propellus Maximus
- Posts: 1238
- Joined: Mon Feb 27, 2006 5:56 am
- Location: Melbourne, Australia
Re: Rename .htm to .html
I'm confused. How is your developer calling HTML instead of HTM if you have a CHM? Wouldn't they just call the .CHM file?TeSol wrote:... Only thing is, that is an option during generation of Webhelp; and I am looking at CHM file generation.
Margaret Hassall - Melbourne
Re: Rename .htm to .html
Yes, but for context sensitive help, they would call the .html file.
-
- Senior Propellus Maximus
- Posts: 4293
- Joined: Thu Feb 02, 2006 9:29 am
- Location: The Electric City
Re: Rename .htm to .html
Which .html file? I know that the CHM contains html files, but why not use map IDs or aliases instead? That is much easier than using sth like mk:@MSITStore:C:\WINDOWS\start.chm::/start.html ...and you are free to change file names and file locations without the need to have a developer change the code.
New Book: Creating user-friendly Online Help
Paperback http://www.amazon.com/dp/1449952038/ or https://www.createspace.com/3416509
eBook http://www.amazon.com/dp/B005XB9E3U
Paperback http://www.amazon.com/dp/1449952038/ or https://www.createspace.com/3416509
eBook http://www.amazon.com/dp/B005XB9E3U
-
- Propeller Head
- Posts: 13
- Joined: Fri Jun 12, 2015 1:57 pm
- Location: Thousand Oaks, CA
- Contact:
Re: Rename .htm to .html
I'm bumping this thread since I'm in the same situation as TeSol. In other words, the developers need a compiled help file (.CHM) and they link their help buttons to HTML page names and not map IDs or aliases. I was just wondering if anyone has found a simpler way other than renaming the files manually.
I have no idea why it was set up that way. However, every place I've worked has had an odd way of integrating help so I'm not too surprised. (At one place I worked I had to modify the application code.) Hopefully, in the future they'll go to a more logical way (e.g., map IDs).RamonS wrote:Which .html file? I know that the CHM contains html files, but why not use map IDs or aliases instead? That is much easier than using sth like mk:@MSITStore:C:\WINDOWS\start.chm::/start.html ...and you are free to change file names and file locations without the need to have a developer change the code.
MadCap Flare v11, MadCap Capture v7
-
- Propellus Maximus
- Posts: 810
- Joined: Wed Jul 25, 2012 11:36 am
- Location: Ann Arbor, MI
Re: Rename .htm to .html
I haven't worked with CHM files in years, so I'm not sure this is going to help you. But you can easily change file extensions of your source files with this Visual Basic Script:
Paste that into NotePad, save it with a VBS extension, and double-click when you need it. Flare keeps the HTML extension in the output. I was a little worried that the script would see the first three letters of the HTML extension and keep cycling, giving me .htmhtml, but it worked in testing.
Code: Select all
'Change to .html
Const CHANGE_FROM = ".htm"
Const CHANGE_TO = ".html"
'Var Declaration
Dim srcFolder
Dim objFSO, objFolder, oFolder
Dim colFiles
'Source Folder - change to your source files
srcFolder = "C:\Users\kwag.myers\Documents\Project\Content"
Set objFSO = CreateObject("Scripting.FileSystemObject")
Set objFolder = objFSO.GetFolder(srcFolder)
Set colFiles = objFolder.Files
' Changes Files Extensions in Source Folder
ChangeExtension colFiles
Sub ChangeExtension(collectionSet)
Dim objFile
For Each objFile In collectionSet
If InStr(objFile.Name,CHANGE_FROM) Then
objFile.Name = Replace(objFile.Name,CHANGE_FROM,CHANGE_TO)
End If
Next
End Sub
"I'm tryin' to think, but nothin' happens!" - Curly Joe Howard
-
- Propeller Head
- Posts: 13
- Joined: Fri Jun 12, 2015 1:57 pm
- Location: Thousand Oaks, CA
- Contact:
Re: Rename .htm to .html
Thanks kwag_myers! I will give it a try.
MadCap Flare v11, MadCap Capture v7
-
- Propellus Maximus
- Posts: 810
- Joined: Wed Jul 25, 2012 11:36 am
- Location: Ann Arbor, MI
Re: Rename .htm to .html
One thing I noticed this morning is that using the script repeatedly doesn't work as well as I first thought. Instead of *.htmhtml, I had *.htmll. So, you have two options for adding new topics:
1. Have two versions of the script with the second version set to look for the double L. When you run the first script to fix any new files, you'll need to run this second script to fix the existing files:
2. Change the new file(s) manually.
Also, I noticed all the links in the TOC were broken, so you'll have to update those (manually I believe). However, links within the topic files can be updated with Flare's Find and Replace feature.
1. Have two versions of the script with the second version set to look for the double L. When you run the first script to fix any new files, you'll need to run this second script to fix the existing files:
Code: Select all
Const CHANGE_FROM = ".htmll"
Also, I noticed all the links in the TOC were broken, so you'll have to update those (manually I believe). However, links within the topic files can be updated with Flare's Find and Replace feature.
"I'm tryin' to think, but nothin' happens!" - Curly Joe Howard