reading html file in foxpro

Hi

I want to check an .html (or TXT if thats easier) file with foxpro for this line:

src="cid:image001.jpg@01C67F47.26775C40"

and replace it with

src="image001.jpg"

how can I do this, I can't figure it out :(



Answer this question

reading html file in foxpro

  • nzracer

    Did you mean you cannot see the error detail as it is in a popup (your message is not clear).

    Open the Debugger (ex. SET STEP ON) then step through the code, line by line and see which line gives you an error.


  • Sonia Taneja

    Something like this:

    local lcText
    lcText = FILETOSTR("c:\temp\MyFile.HTM")
    lcText = STRTRAN(lcText,[src="cid:image001.jpg@01C67F47.26775C40"],[src="image001.jpg"])
    STRTOFILE(lcText,"c:\temp\MyNewFile.HTM")


  • HonzaHornik

    Can't do that It won't work on its own, its part of a bigger proggram its just a "module" so debug won't do :(
  • Gilmorenator

    Can't see it's a pop-up
  • robc180

    The code is fine. You need to have the file named "c:\temp\MyFile.HTM", in our c:\temp folder. Else you will get error

    Krishna



  • derekR

    > when I do that I get this error : Function argument value, type, or count invalid

    On which line of code



  • Oscar in LA

    Alex Feldstein wrote:

    Something like this:

    local lcText
    lcText = FILETOSTR("c:\temp\MyFile.HTM")
    lcText = STRTRAN(lcText,[src="cid:image001.jpg@01C67F47.26775C40"],[src="image001.jpg"])
    STRTOFILE(lcText,"c:\temp\MyNewFile.HTM")

    when I do that I get this error : Function argument value, type, or count invalid


  • Aaron Lahman

    If you run the larger program from inside the VFP development environment you can explicitly code a SET STEP ON at the beginning of the code fragment you are trying to get working and then use the debugger to walk through the code to find the error.

  • vivek25

    look at using :

    STRTRAN() with

    filetostr(), append from\type or alines()

    Dave M.



  • reading html file in foxpro