| Subject: Re: Change filename from html to php |
Author: Xavier Roche |
Date: 10/10/2003 23:02 |
| | > I would like to use httrack to
> mirror pages that are currently named *.html, renaming
them
> to *.php in the process. I also want to be sure that any
> links within the pages point to the renamed (*.php) pages.
Ah - this is not possible with httrack.
But you can use some scripting (bash-style, using a linux
console, or a windows+cygwin console) for that :
find . -type f -name "*.html" -exec ./myscript {} \;
With a "myscript" script such as:
#!/bin/sh
#
test -f "$1" || exit 1
cat "$1" | sed -e "s/\([\"']\)\([^\"']*\)\(\.html\)\([\"']
\)/\1\2\.php\4/g" > "${1%.*}.php"
rm -f "$1"
| |
|
|
|
|
6
Created with FORUM 2.0.11