Reply to Re: Quick Question!!

Your name:

Reply:


Posted by Blinky the Shark on 06/06/05 00:34

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*

[Back to original message]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация