OE pro 4.3 influences search and replace script

tony
06/15/2006 03:42 am
Hi,

I have just upgraded to 4.3.

After I run a project I automatically start a batch file from within the project settings.

The batch file runs a couple of pieces of sotware in sequence to work on the files.

But a simple search/replace program now skips one command that it didn't previously.


However, if I don't let oe pro 4.3 start the batch file and start it from windows explorer instead, there is no problem.


I uninstalled version 4.3 and reinstalled the previous version, and everything works fine again.


Seems to be a bug of some kind in 4.3.
Oleg Chernavin
06/15/2006 03:53 am
Can you please tell me more details about the skipped program? Can I reproduce it somehow myself? As far as I remember, I didn't change the code that starts a batch file or any other executable.

Best regards,
Oleg Chernavin
MP Staff
tony
06/15/2006 04:38 am
Hi Oleg,

I think this is going to be tricky to reproduce for you.

The program in question is Search and Replace for Windows 5.1 by FUNDUC Software Inc:
http://www.funduc.com/

The program starts just fine. For a different project everything is fine. It just has a problem with one particular search/replace command. But only when started from within oe pro 4.3.

The problematic search/replace command seems to be this one:

[Search /bix]
<img src=\'../../../yyy/zzz*/*\' width=\'500\' height=\'500\' border="1" alt=
<img src=\'../../../yyy/zzz/*/*' width="320" height="240" border="0" alt=
<img src=\'../../../yyy/zzz/*/*' width="320" height="240" border="1" alt=
[Replace /b]
'\<img src=''..\\yyy\\zzz\\%3\\%4'' width=''80'' height=''60''\>',
'\<img src=''..\\xxx\\yyy\\zzz\\%3\\%4'' width=''280'' height=''210''\>',
'\<img src=''..\\xxx\\yyy\\zzz\\%5\\%6'' width=''280'' height=''210''\>',
'\<img src=''http://www.aaa.com/bbb/xxx/yyy/zzz/%3/%4'' width=''80'' height=''60''\>',
'\<img src=''http://www.aaa.com/bbb/xxx/yyy/zzz/%5/%6'' width=''80'' height=''60''\>',
'\<img src=''..\\xxx\\yyy\\zzz\\%1\\%2'' width=''500'' height=''500''\>');

The backslash is used in front of special characters recognised by the serach/replace software, in this case, \ ' > < depending on if searching or replacing.

The symbol * in the search represents characters which are then input to the replace using %1 etc depending on the sequence of the * symbol.


I can't think of any reason why the would be skipped, but it appears to be the only thing that is, and only when the batch file that starts the search/replace software is triggered by the project settings.

Very strange.
tony
06/15/2006 04:46 am
Hi Oleg,

Something else I just noticed.

The search/replace immediately before this is:

[Search /i]
/rocess
[Replace]


This might look weird, but going way back I was using the word 'process' in the url subs (which I still do) and it was popping up in the html code of the files after export. You fixed that problem. I am just wondering if this has something to do with it.

I would test with 4.3 but I am in the middle of downloads and it will have to wait until tomorrow before I can test.

Any thoughts?
Oleg Chernavin
06/15/2006 04:51 am
I have no good idea right now. How do you start that search - using a .bat or .cmd file?

Oleg.
tony
06/15/2006 05:05 am
.bat Oleg,

Tony.
Oleg Chernavin
06/15/2006 05:21 am
Could it be that the file that is about to process is locked or there are many files?

What if you would create a new .bat file for that particular failed command and you would run the new .bat file from inside the first .bat?

Oleg.
tony
06/16/2006 04:38 am
Haven't had a chance to try your suggestion Oleg.

But I have noticed that when the batch file is started from inside 4.3 when it processes the files a ../ is dropped.

ie, the urls starting ../../../ end up as ../../ which is why the particular search/replace command doens't work. ie it isn't set up to search for ../../

Does this shed any light?
Oleg Chernavin
06/16/2006 04:44 am
Where ../ is dropped? In the files on your disk?

Oleg.
tony
06/16/2006 06:14 am
Not dropped on the files on my disk but I think it is dropped on the exported files. (I export only new files to a different directory for processing).
tony
06/16/2006 06:15 am
Just to make sure I am clear!

In each file there are links in the html. The ../ is being dropped from the start of those links.
Oleg Chernavin
06/16/2006 06:22 am
Yes, it is possible that some links to images in the Export will be changed in 4.3 version - I fixed some errors with them to overcome some issues with overloaded directories.

Oleg.
tony
06/16/2006 11:54 am
Is this a case of 'over-fixing' Oleg? It makes it awkward if the file html in the oe downloaded directory and the exported directory are different.
Oleg Chernavin
06/16/2006 02:49 pm
Yes, links could be different, because export makes sure that all links will be working offline without Offline Explorer.

Oleg.
tony
06/16/2006 10:56 pm
OK Oleg - I can't remember ever browsing the exported files as I just use them for processing, so maybe this is something that was previously a problem but I didn't realise.

I have adjusted my search/replace scripts to take into account the change and all is well now.

Many thanks,

Tony.
Oleg Chernavin
06/17/2006 04:17 pm
OK. Sorry that the new version took your time.

Oleg.