[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]

Re: converting .php files to .dhtml



Hello Ankush,

Tuesday, July 19, 2005, 9:48:00 AM, you wrote:

AG> hey friends,

AG> I want to know how to change all the file types of .php into .dhtml of
AG> a directory.There are few subdirectory under the main directory and
AG> each directory contains many .php files.

AG> I want to convert all the .php files under the main directory and
AG> under its subdirectories to .dhtml.

AG> Thanks & Regards
AG> Ankush Grover


create a shell script named php2dhtml.sh in your homedir with the following contents:
#!/bin/sh
[ -f "${1}" ] && mv "${1}" "${1/.php/.dhtml}"


then do something like:
find /path/to/phpfiles/ -name "*.php" -exec ~/php2dhtml.sh {} \;

-- 
Best regards,
 Shane

Shane Lahey <s lahey nl rogers com>
Homepage: http://craz1.homelinux.com
WebAlbum: http://webalbum.webhop.net


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]