This is a discussion on How do I rename all the files from .htm to .html after copying them from a PC to a UN within the HTML, CSS and Javascript Coding Techniques forums, part of the Web Development category; How do I rename all the files from .htm to .html after copying them from a PC to a UNIX ...
| |||||||
| Register | FAQ | Members List | Calendar | Mark Forums Read |
| |||
| UNIX's mv (`move') command won't handle wildcard filenames. However, there's a program called htmaddl (for `HTM-add-"L"'), so you can login and type htmaddl. This will rename all .htm files to .html If you haven't got this program on your UNIX machine, you can type it into a file called htmaddl: #! /bin/sh for f in *.htm; do base=`basename $f .htm` mv $f $base.html done After saving it and exiting your editor, make it executable by typing the command chmod ugo+x htmaddl Best of all, move it into your ~/bin directory, or ask your WebMeister to put it in /usr/local/bin so everyone can use it. |
![]() |
| Thread Tools | |
| Display Modes | |
| |
Similar Threads | ||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Help me to rename the flex project | seesamjagan | Adobe Flex Programming | 0 | 01-03-2008 10:55 PM |
| Rename Files in Bulk in Windows XP | srikumar_l | Operating Systems | 0 | 12-19-2007 09:42 PM |
| How can I rename all files in a folder using Java? | leoraja8 | Java Programming | 4 | 11-13-2007 12:15 AM |
| How to Protect our text from copying in flash? | kingmaker | Flash Actionscript Programming | 1 | 07-21-2007 02:50 AM |
| Display html files in Flash | oxygen | Flash Actionscript Programming | 1 | 07-19-2007 12:54 AM |