Author |
Message |
Justin
4WebHelp Addict
Joined: 07 Jan 2002
Posts: 1060
|
Posted:
Sun Aug 04, 2002 12:18 am (21 years, 8 months ago) |
|
I have a problem......
I have a load of .php files which all have font tags to set the color text as 3300A8, but now I want to change every single tag that says 3300A8 to 0000B1, but I don't want to go through 2,000 files manually, is there an automatic way to do this?
I've tried importing my pages into FrontPage, but it doesn't support .php for find and replace, only microsoft and standard HTML file types. So is there a command I can run to batch rename 2,000 files, so I can run this process, then turn them back to .php's?
Thanks
Justin |
|
|
|
|
jayant
Team Member
Joined: 07 Jan 2002
Posts: 262
Location: New Delhi, India
|
Posted:
Sun Aug 04, 2002 2:54 am (21 years, 8 months ago) |
|
You can use TextPad or UltraEdit, they both are wonderful text editors with syntax highlighting for many languages and have replace all facility for all file types. You can can make a script in Perl/PHP to do the same, using regular expressions.
If you are keen to use Microsoft only, then if you have Windows XP, it can do multiple renaming. If 9X/ME/2k go to command prompt and type ren *.php *.htm and when you have changed the things ren *.htm *.php |
________________________________ Jayant Kumar
Member of the 4WebHelp Team
Nibble Guru - Computing Queries Demystified
GZip/ Page Compression Test |
|
|
|
Justin
4WebHelp Addict
Joined: 07 Jan 2002
Posts: 1060
|
Posted:
Sun Aug 04, 2002 1:33 pm (21 years, 8 months ago) |
|
jayant wrote: |
If you are keen to use Microsoft only, then if you have Windows XP, it can do multiple renaming. If 9X/ME/2k go to command prompt and type ren *.php *.htm and when you have changed the things ren *.htm *.php |
Unfortunatley I'm on Windows XP Pro, so I can't do the Command Prompt command that I would usually use, how would I do multiple renaming with Windows XP - I know it's probbably got an obvious answer but I don't know it! |
|
|
|
|
Ben
Senior WebHelper
Joined: 08 Jan 2002
Posts: 431
Location: Liverpool - UK
|
Posted:
Sun Aug 04, 2002 2:08 pm (21 years, 8 months ago) |
|
start>run>cmd
ren with wildcards works fine in XP pro, I use it all the time |
________________________________ Ben Scott
Red and White Kop |
|
|
|
Justin
4WebHelp Addict
Joined: 07 Jan 2002
Posts: 1060
|
Posted:
Sun Aug 04, 2002 2:53 pm (21 years, 8 months ago) |
|
doesn't here, but thats probbably because my build of XP is not completely *cough* legal, I'm sure MS know about this 'cos I can't get on Windows Update.
Anyway, I used TextPad in the end, and found it really useful, and really good, and the find and replace features in that are excellent! |
|
|
|
|
savagegal
Junior WebHelper
Joined: 04 Aug 2002
Posts: 6
|
Posted:
Sun Aug 04, 2002 4:46 pm (21 years, 8 months ago) |
|
Justin wrote: | doesn't here, but thats probbably because my build of XP is not completely *cough* legal, I'm sure MS know about this 'cos I can't get on Windows Update.
Anyway, I used TextPad in the end, and found it really useful, and really good, and the find and replace features in that are excellent! |
I am also on similar version of XP Pro but I can go on windowsupdate and command prompt is also there |
|
|
|
|
adam
Forum Moderator & Developer
Joined: 26 Jul 2002
Posts: 704
Location: UK
|
Posted:
Sun Aug 04, 2002 6:39 pm (21 years, 8 months ago) |
|
even though you couldn't have accessed the command prompt, would it have been possible for you to create an MS-DOS batch file? |
________________________________ It's turtles all the way down... |
|
|
|
Justin
4WebHelp Addict
Joined: 07 Jan 2002
Posts: 1060
|
Posted:
Sun Aug 04, 2002 6:48 pm (21 years, 8 months ago) |
|
'RENAME' is not recognized as an internal or external command,
operable program or batch file.
'REN' is not recognized as an internal or external command,
operable program or batch file.
Getting into DOS wasn't the problem, getting the command to work was! |
|
|
|
|
adam
Forum Moderator & Developer
Joined: 26 Jul 2002
Posts: 704
Location: UK
|
Posted:
Sun Aug 04, 2002 6:52 pm (21 years, 8 months ago) |
|
oh, I misunderstood! Did you try "move" or "mv"? |
________________________________ It's turtles all the way down... |
|
|
|
JointComms
WebHelper
Joined: 03 May 2002
Posts: 79
Location: Windsor, CANADA
|
Posted:
Mon Aug 05, 2002 1:16 am (21 years, 8 months ago) |
|
Note tab lite is excellent for what I understand your needs to be.
www.notetab.com |
|
|
|
|
|