Quick Question!!

G

Gaffer

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.
 
D

David Dorward

Gaffer said:
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
 
H

Hywel Jenkins

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?
 
G

Gaffer

Hywel Jenkins said:
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?
 
G

Gaffer

David Dorward said:
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!!
 
D

David Dorward

Gaffer said:
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/
 
B

Blinky the Shark

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.
 
J

Jonathan N. Little

Andy said:
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....
 
A

Adrienne

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/>
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,769
Messages
2,569,579
Members
45,053
Latest member
BrodieSola

Latest Threads

Top