Highlighted

Convert FrontPage Templates to Dreamweaver

Explorer ,
May 16, 2020

Copy link to clipboard

Copied

I have about 21000 html files created years ago using FrontPage. They all use the same template (filetype dwt), but were in a folder called "Common" not "Templates" like Dreamweaver requires.

 

I made a change within the old FP template to reflect the layout of my current web site and tested it on a few files. Since the old template isn't in the Templates folder, I need to figure out a way to have Dreamweaver update all those 21000 html files. I can't just move the old template into the Templates folder because all the 21000 files have references to the template in them. I can't do a find and replace of the template name and change the directory in the 21000 files because the path is in an uneditable region in each file.

 

I wrote a PowerShell script and ran it as Administrator.

 

$filenames = @(get-childitem -Path "C:\Users\denny\OneDrive\dennyptravel\Web Sites\httpdocs\*" | % { $_.FullName })

        foreach ($file in $filenames) 
        {
            $replacementStr = 'Templates/main2.dwt' 
            (Get-Content $file) | 
                Foreach-object { $_ -replace 'common/main2.dwt' , $replacementStr   } | 
             Set-Content $file
             Write-Host Processed $file
        }

I ran it on a subset of my 21000 files that I copied into a test directory on my local c: drive. It worked fine. Then I went to run it on my live files (which happen to be on a OneDrive directory). I received this error on every file.

 + CategoryInfo          : PermissionDenied: (C:\Users\denny\...\httpdocs\2007w:String) [Get-Content], Unauthorized
   AccessException
    + FullyQualifiedErrorId : GetContentReaderUnauthorizedAccessError,Microsoft.PowerShell.Commands.GetContentCommand

I then ran the following command in PowerShell in admin mode.

Set-ExecutionPolicy RemoteSigned

When I reran the find/replace code, I got the same access errors.

Any ideas on eliminating the access errors or perhaps have another Find/Replace solution that would work against 21000 files? Thank you.

I found a quick and easy solution that was under my nose all along.

 

I used the find/replace capability within notepad++ (it's very robust) to change the directory where the old FP template was stored to the Templates directory. (I previously moved the dwt file to the Templates directory.) These files are in the cloud in OneDrive.

 

Then within DW, I switched sites to another site, then switched back. That caused DW to scan for changes so it could update its internal files keeping track of what pages use what templates. (I couldn't quickly find another way to do that.)

 

I then used the Tool > Templates  > Update Pages (Look in files that use ...) to update the files using the old FP template.

 

I did a Put on the changed files to my server - all is done.

 

 

Views

835

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more

Convert FrontPage Templates to Dreamweaver

Explorer ,
May 16, 2020

Copy link to clipboard

Copied

I have about 21000 html files created years ago using FrontPage. They all use the same template (filetype dwt), but were in a folder called "Common" not "Templates" like Dreamweaver requires.

 

I made a change within the old FP template to reflect the layout of my current web site and tested it on a few files. Since the old template isn't in the Templates folder, I need to figure out a way to have Dreamweaver update all those 21000 html files. I can't just move the old template into the Templates folder because all the 21000 files have references to the template in them. I can't do a find and replace of the template name and change the directory in the 21000 files because the path is in an uneditable region in each file.

 

I wrote a PowerShell script and ran it as Administrator.

 

$filenames = @(get-childitem -Path "C:\Users\denny\OneDrive\dennyptravel\Web Sites\httpdocs\*" | % { $_.FullName })

        foreach ($file in $filenames) 
        {
            $replacementStr = 'Templates/main2.dwt' 
            (Get-Content $file) | 
                Foreach-object { $_ -replace 'common/main2.dwt' , $replacementStr   } | 
             Set-Content $file
             Write-Host Processed $file
        }

I ran it on a subset of my 21000 files that I copied into a test directory on my local c: drive. It worked fine. Then I went to run it on my live files (which happen to be on a OneDrive directory). I received this error on every file.

 + CategoryInfo          : PermissionDenied: (C:\Users\denny\...\httpdocs\2007w:String) [Get-Content], Unauthorized
   AccessException
    + FullyQualifiedErrorId : GetContentReaderUnauthorizedAccessError,Microsoft.PowerShell.Commands.GetContentCommand

I then ran the following command in PowerShell in admin mode.

Set-ExecutionPolicy RemoteSigned

When I reran the find/replace code, I got the same access errors.

Any ideas on eliminating the access errors or perhaps have another Find/Replace solution that would work against 21000 files? Thank you.

I found a quick and easy solution that was under my nose all along.

 

I used the find/replace capability within notepad++ (it's very robust) to change the directory where the old FP template was stored to the Templates directory. (I previously moved the dwt file to the Templates directory.) These files are in the cloud in OneDrive.

 

Then within DW, I switched sites to another site, then switched back. That caused DW to scan for changes so it could update its internal files keeping track of what pages use what templates. (I couldn't quickly find another way to do that.)

 

I then used the Tool > Templates  > Update Pages (Look in files that use ...) to update the files using the old FP template.

 

I did a Put on the changed files to my server - all is done.

 

 

Views

836

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
May 16, 2020 0
Adobe Community Professional ,
May 16, 2020

Copy link to clipboard

Copied

I don't see the problem, why do you need to Dreamweaverise the project. If the site works, then you can make changes using Dreamweaver. 

 

If you want to use Dreamweaver's template system, you can follow these instructions: https://helpx.adobe.com/au/dreamweaver/using/applying-or-removing-template-existing.html

 

I know that there are a rediculous number of HTML documents to go through, but that is of your own making. I would have gone for a dynamic site before I reached 20 documents.


Ben

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
Reply
Loading...
May 16, 2020 1
Explorer ,
May 16, 2020

Copy link to clipboard

Copied

In addition to the 21000 older Front Page files, I also have about 10000 Dreamweaver files built using the DW template system. My goal is to convert the older FP files to use the same DW template so that all of my 30000 files have a similar look and feel.

 

I was using a dynamic site in FP for those 21000 files when I used FP 20 years ago. I only started using DW when FP was not supported anymore. You said "I would have gone for a dynamic site before I reached 20 documents.". And I did start off 20 years ago using a dynamic site under FP. You say "I don't see the problem, why do you need to Dreamweaverise the project". I have a mix of FP dynamic pages and DW dynamic pages. I want them all to be "Dreamweaverised".

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
Reply
Loading...
May 16, 2020 0
Adobe Community Professional ,
May 16, 2020

Copy link to clipboard

Copied

I feel your pain, but love your passion. Sorry I cannot add to a solution.

 

Stay healthy


Ben

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
Reply
Loading...
May 16, 2020 0
Adobe Community Professional ,
May 16, 2020

Copy link to clipboard

Copied

Forgive me for saying this but when anybody mentions FrontPage or GoLive these days, I have to ask myself, "why bother?" 

 

Those defunct products were discontinued 10+ years ago. And the sites people made with them have long since been discarded and replaced with all new sites. 

 

I hope you understand that you cannot perform F&R on remotely stored files. And DW works best with local site files stored on the primary hard drive, not cloud or networked drives.  Beyond that, it's anybody's guess if this massive Find & Replace effort will work on 21,000 pages. Good luck with that.

 

Nancy O'Shea, ACP
Alt-Web.com

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
Reply
Loading...
May 16, 2020 0
Explorer ,
May 16, 2020

Copy link to clipboard

Copied

Those defunct products were discontinued 10+ years ago. And the sites people made with them have long since been discarded and replaced with all new sites. 

Correct. All my new pages over the last several years were built under Dreamweaver. Those pages still have good historical information for my users in the way of trip reports from years ago to many resorts. They still get many page views.

 

I hope you understand that you cannot perform F&R on remotely stored files. And DW works best with local site files stored on the primary hard drive, not cloud or networked drives. 

I am able to do F&R on OneDrive cloud files with no problem on a few at a time. I am just looking for a way to do it in bulk. DW is working fine on my OneDrive files. I need them in the cloud because I have to be able to do web maintenance from my office computer and my laptop while traveling.

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
Reply
Loading...
May 16, 2020 0
Explorer ,
May 17, 2020

Copy link to clipboard

Copied

I found a quick and easy solution that was under my nose all along.

 

I used the find/replace capability within notepad++ (it's very robust) to change the directory where the old FP template was stored to the Templates directory. (I previously moved the dwt file to the Templates directory.) These files are in the cloud in OneDrive.

 

Then within DW, I switched sites to another site, then switched back. That caused DW to scan for changes so it could update its internal files keeping track of what pages use what templates. (I couldn't quickly find another way to do that.)

 

I then used the Tool > Templates  > Update Pages (Look in files that use ...) to update the files using the old FP template.

 

I did a Put on the changed files to my server - all is done.

 

 

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
Reply
Loading...
May 17, 2020 1