Text blocks find & replace???

Get help with installation and running here.

Moderators: DataMystic Support, Moderators, DataMystic Support, Moderators, DataMystic Support, Moderators

Post Reply
Guest

Text blocks find & replace???

Post by Guest »

I would like to change some header files in 150 php files.

The old header is something like:

Code: Select all

/**********************************************
   This script is made by me

   (c) 2000-2004
**********************************************/
Let's say I would like to delete this header. I copy this textblock in a find & replace filter (exact match). But he does not find a hit, so nothing is replaced.

I thought this could be done in this way? Do I have to do something else?
User avatar
DataMystic Support
Site Admin
Posts: 2227
Joined: Mon Jun 30, 2003 12:32 pm
Location: Melbourne, Australia
Contact:

Post by DataMystic Support »

Is the text *exactly* the same?

Or perhaps the files have unix end of lines in them, and need to be converted?
Guest

Post by Guest »

I use Cute FTP to connect to the server where the files I want to change are on.

Then I choose in Cute FTP to edit a file and copy the textblock I want to change.

I copy that textblock in TextPipe filter find & replace.
I let TextPipe look directly on the server through a webdrive program that mounts the server as an extra harddrive to my windows machine. Drive X.
So I point in TextPipe to x:\httpdocs\www\files.php

In the filter I see lines ending with: \r\n
So this is indead a Unix end of line.

Can I add a filter before the find & replace to convert it to PC/dos?
User avatar
DataMystic Support
Site Admin
Posts: 2227
Joined: Mon Jun 30, 2003 12:32 pm
Location: Melbourne, Australia
Contact:

Post by DataMystic Support »

Yes you sure can - that's the power of TextPipe, adding multiple filters in any order. You'll find it under the Convert\End of line characters menu item.
Guest

Post by Guest »

Thanks Simon
cngpros
Posts: 4
Joined: Tue Oct 05, 2004 3:23 am

Post by cngpros »

What is the best format for PC to/from Linux conversions ?

We think Fedora Core 1 is ISO-8859-1 but unsure what would be the PC side or a file format to convert the original file that would transfer to and from without additional conversions.

What we are doing:

1. We downloaded to a W2000 work station a file file.php from a Fedora Core 1 Linux server using BestFTP

2. Edited the file on the W2000

3. Best FTP back to server.

4. w2k edited File does not execute. We are assuming something in the PHP syntax is a mismatch, like `'? when going from PC to/from Linux.
User avatar
DataMystic Support
Site Admin
Posts: 2227
Joined: Mon Jun 30, 2003 12:32 pm
Location: Melbourne, Australia
Contact:

Post by DataMystic Support »

What are you editing the file with?
Post Reply