Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > HTML > Quick Question!!

Reply
Thread Tools

Quick Question!!

 
 
Gaffer
Guest
Posts: n/a
 
      06-05-2005
I have a folder with a few .asp pages in it. Can I convert them all to .htm
or .html without having to go over them all? I'm using Dreamweaver as my
editor.

--
Gaffer


 
Reply With Quote
 
 
 
 
David Dorward
Guest
Posts: n/a
 
      06-05-2005
Gaffer wrote:

> I have a folder with a few .asp pages in it. Can I convert them all to
> .htm or .html without having to go over them all? I'm using Dreamweaver as
> my editor.


The file extension? You can change it freely - although you'll have to
update any links to it.

Any pages which include ASP processing instructions would still need to be
handled as ASP or rewritten though.

Of course; http://www.w3.org/Provider/Style/URI.html

--
David Dorward <http://blog.dorward.me.uk/> <http://dorward.me.uk/>
Home is where the ~/.bashrc is
 
Reply With Quote
 
 
 
 
Hywel Jenkins
Guest
Posts: n/a
 
      06-05-2005
In article <utJoe.6879$(E-Mail Removed)>,
http://www.velocityreviews.com/forums/(E-Mail Removed) says...
> I have a folder with a few .asp pages in it. Can I convert them all to .htm
> or .html without having to go over them all? I'm using Dreamweaver as my
> editor.


Dunno. What's in them? If there's server-side content odds are you'll
knacker your site. If there's not server-side content DW might even
rename all the links for you. Why not try it?

--
Hywel

Kill the Crazy Frog
http://www.petitiononline.com/crzyfrg/
 
Reply With Quote
 
Gaffer
Guest
Posts: n/a
 
      06-05-2005

"Hywel Jenkins" <(E-Mail Removed)> wrote in message
news:(E-Mail Removed) k...
> In article <utJoe.6879$(E-Mail Removed)>,
> (E-Mail Removed) says...
>> I have a folder with a few .asp pages in it. Can I convert them all to
>> .htm
>> or .html without having to go over them all? I'm using Dreamweaver as my
>> editor.

>
> Dunno. What's in them? If there's server-side content odds are you'll
> knacker your site. If there's not server-side content DW might even
> rename all the links for you. Why not try it?
>
> --
> Hywel
>
> Kill the Crazy Frog
> http://www.petitiononline.com/crzyfrg/
>
>


I don't want to edit the html code. I just want to change the page
extensions, ie.: index.asp will now be index.htm. You get me? Can I do this?

--
Gaffer


 
Reply With Quote
 
Gaffer
Guest
Posts: n/a
 
      06-05-2005

"David Dorward" <(E-Mail Removed)> wrote in message
news:d7vour$qoc$1$(E-Mail Removed)...
> Gaffer wrote:
>
>> I have a folder with a few .asp pages in it. Can I convert them all to
>> .htm or .html without having to go over them all? I'm using Dreamweaver
>> as
>> my editor.

>
> The file extension? You can change it freely - although you'll have to
> update any links to it.
>
> Any pages which include ASP processing instructions would still need to be
> handled as ASP or rewritten though.
>
> Of course; http://www.w3.org/Provider/Style/URI.html
>
>
>


I KNOW I can change them. It's my bloody site and I can do as I wish. But
HOW do I change all the pages (ie.: index.asp, menu.asp, links.asp,
htmlnonsense.asp) so that the extension changes (ie.: index.htm, menu.htm,
links.htm, htmlnonsense.htm). Do I have to open each page, click "save as"
index.htm and do the same for each page, or can I change them all at once.
I'm talking about the actually file, not the html code!!

--
Gaffer


 
Reply With Quote
 
David Dorward
Guest
Posts: n/a
 
      06-05-2005
Gaffer wrote:
> I KNOW I can change them. It's my bloody site and I can do as I wish. But
> HOW do I change all the pages (ie.: index.asp, menu.asp, links.asp,
> htmlnonsense.asp) so that the extension changes (ie.: index.htm, menu.htm,
> links.htm, htmlnonsense.htm). Do I have to open each page, click "save as"
> index.htm and do the same for each page, or can I change them all at once.
> I'm talking about the actually file, not the html code!!


Well, a bash script along the lines of:

for x in *.asp
do mv "$x" "`echo $x | sed s/\.asp/.html/`"
done

....will probably do the job. Macs come with bash, and you can download it
for Windows from http://www.cygwin.com/


--
David Dorward <http://blog.dorward.me.uk/> <http://dorward.me.uk/>
Home is where the ~/.bashrc is
 
Reply With Quote
 
Blinky the Shark
Guest
Posts: n/a
 
      06-05-2005
David Dorward wrote:
> Gaffer wrote:
>> I KNOW I can change them. It's my bloody site and I can do as I wish. But
>> HOW do I change all the pages (ie.: index.asp, menu.asp, links.asp,
>> htmlnonsense.asp) so that the extension changes (ie.: index.htm, menu.htm,
>> links.htm, htmlnonsense.htm). Do I have to open each page, click "save as"
>> index.htm and do the same for each page, or can I change them all at once.
>> I'm talking about the actually file, not the html code!!


> Well, a bash script along the lines of:


> for x in *.asp
> do mv "$x" "`echo $x | sed s/\.asp/.html/`"
> done


> ...will probably do the job. Macs come with bash, and you can download it
> for Windows from http://www.cygwin.com/


Does Win have the equiv of rename?

DESCRIPTION

rename will rename the specified files by replacing the first occur-
rence of from in their name by to.

For example, given the files foo1, ..., foo9, foo10, ..., foo278, the
commands

rename foo foo0 foo?
rename foo foo0 foo??

will turn them into foo001, ..., foo009, foo010, ..., foo278.

And
rename .htm .html *.htm

will fix the extension of your html files.

--
Blinky Linux Registered User 297263
Killing all Usenet posts from Google Groups
Info: http://blinkynet.net/comp/uip5.html
*ALSO contains links for access to the NON-BETA GG archive interface*
 
Reply With Quote
 
Andy Dingley
Guest
Posts: n/a
 
      06-05-2005
On Sun, 05 Jun 2005 20:57:09 GMT, "Gaffer" <(E-Mail Removed)>
wrote:

>Can I do this?


No



(you seem to like simple answers)
 
Reply With Quote
 
Jonathan N. Little
Guest
Posts: n/a
 
      06-06-2005
Andy Dingley wrote:
> On Sun, 05 Jun 2005 20:57:09 GMT, "Gaffer" <(E-Mail Removed)>
> wrote:
>
>
>>Can I do this?

>
>
> No
>
>
>
> (you seem to like simple answers)


Agreed, NO. Yes you could rename them 'ren *.asp *.html' but chances
are the ASP pages contain ASP server-side scripting. HTML is static, or
dynamic with client-side scripting. The actual content code would have
to be changed....

--
Take care,

Jonathan
-------------------
LITTLE WORKS STUDIO
http://www.LittleWorksStudio.com
 
Reply With Quote
 
Adrienne
Guest
Posts: n/a
 
      06-06-2005
Gazing into my crystal ball I observed "Gaffer"
<(E-Mail Removed)> writing in
news:utJoe.6879$(E-Mail Removed):

> I have a folder with a few .asp pages in it. Can I convert them all to
> .htm or .html without having to go over them all? I'm using Dreamweaver
> as my editor.
>


The question is why do you need to change them? After all, the ASP script
writes HTML to the browser.

If have any ASP code in the page at all, the browser will render it. For
example:
<p>Hello World</p>
<% response.write "Hello World in ASP"%>

will show:
Hello World
<% response.write "Hello World in ASP"%>

If you are doing this because of search engines have difficulties with
dynamic URL's then you can get a component to rewrite the URL for you.
Look at <http://www.isapirewrite.com/>

--
Adrienne Boswell
http://www.cavalcade-of-coding.info
Please respond to the group so others can share
 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Adding quick-release to a non-quick-release tripod head ste7esmith@hotmail.com Digital Photography 4 11-20-2006 03:19 PM
Quick question, hopefully quick answer. ~misfit~ NZ Computing 114 01-06-2005 01:36 PM
Quick Question Quick Answer JKop C++ 11 05-24-2004 09:46 PM
Quick Restore for a Compaq not so quick! Croos Bustamunky Computer Support 2 05-15-2004 04:17 AM
PanasonicBQ390 "quick" charger - How quick? Ol' Bab Digital Photography 1 01-17-2004 06:54 AM



Advertisments