Hello,

I was wondering if there was a way to open a text file
(say C:\test.txt) & save it as C:\text.html. Simply
renaming it will not work.

Thanks in advance!

Re: save as .html by Doc

Doc
Wed Jul 16 16:10:51 CDT 2003

I'm not sure, to be honest. When I manually change the
extension to .html, none of the text shows up when opening
it via browser (although it's still there & can be read
when opening w/ text browser). However, if I (again,
manually) open it up w/ Notepad & save as .html, the text
shows up in the browser just fine.

>-----Original Message-----
>Why will renaming it not work? Saving it with a
different file extension is
>no different, if you're using the FSO anyway.
>
>Ray at work
>
>"Doc" <deanny@att.net> wrote in message
>news:00af01c34bc9$32982f90$a601280a@phx.gbl...
>> Hello,
>>
>> I was wondering if there was a way to open a text file
>> (say C:\test.txt) & save it as C:\text.html. Simply
>> renaming it will not work.
>>
>> Thanks in advance!
>
>
>.
>

Re: save as .html by Doc

Doc
Wed Jul 16 16:45:28 CDT 2003

You're right - it does seem to work w/ a "normal" text
file. I guess I'm back to my original problem, then, in
that the text file that I'm working w/ has an odd null
character at the very beginning of each line. The rest of
the file is fine, so it doesn't seem to be a
unicode/ansi/ascii problem. I can't seem to figure out
how to delete this first character (only the very 1st one
seems to affect anything). When I manually delete the
character, everything works fine.

I realize we are far from the original question, but if
anyone knows how to strip off the very 1st character from
a text file, I'd be much oblidged!

>-----Original Message-----
>well it worked for me. I just tested it. Created a file
called 1.txt and
>put it in c:\temp. I then ran the script below and it
created 1.htm and it
>opened in the browser correctly.
>
>Set objFSO = CreateObject("Scripting.FileSystemObject")
>objFSO.CopyFile "C:\temp\1.txt" , "C:\temp\1.htm"
>--
>Sorry, I am no longer including my e-mail address as I am
getting to much
>spam. I really have no desire to enlarge "it" by three
inches, that is even
>if I get e-mailed 10 times a day from different e-mail
addresses so I can't
>block it.
>Besides I finally came to believe what others have said,
if you have a
>question, you should ask the group as others might
benefit from it. Anyone
>on the group who I converse with off topic or on the
side, can easily find
>my e-mail address.
>
>
>"Doc" <deanny@att.net> wrote in message
>news:0aa401c34bde$bcd626c0$a001280a@phx.gbl...
>> I'm not sure, to be honest. When I manually change the
>> extension to .html, none of the text shows up when
opening
>> it via browser (although it's still there & can be read
>> when opening w/ text browser). However, if I (again,
>> manually) open it up w/ Notepad & save as .html, the
text
>> shows up in the browser just fine.
>>
>> >-----Original Message-----
>> >Why will renaming it not work? Saving it with a
>> different file extension is
>> >no different, if you're using the FSO anyway.
>> >
>> >Ray at work
>> >
>> >"Doc" <deanny@att.net> wrote in message
>> >news:00af01c34bc9$32982f90$a601280a@phx.gbl...
>> >> Hello,
>> >>
>> >> I was wondering if there was a way to open a text
file
>> >> (say C:\test.txt) & save it as C:\text.html. Simply
>> >> renaming it will not work.
>> >>
>> >> Thanks in advance!
>> >
>> >
>> >.
>> >
>
>
>.
>

Re: save as .html by Robert

Robert
Wed Jul 16 16:58:14 CDT 2003

is it always the same character. If so you can do an replace string to
search the file for a particular character or string and replace it.

--
Sorry, I discontined giving my e-mail address. I am tired of all the spam


"Doc" <deanny@att.net> wrote in message
news:040401c34be3$929dcb60$a401280a@phx.gbl...
> You're right - it does seem to work w/ a "normal" text
> file. I guess I'm back to my original problem, then, in
> that the text file that I'm working w/ has an odd null
> character at the very beginning of each line. The rest of
> the file is fine, so it doesn't seem to be a
> unicode/ansi/ascii problem. I can't seem to figure out
> how to delete this first character (only the very 1st one
> seems to affect anything). When I manually delete the
> character, everything works fine.
>
> I realize we are far from the original question, but if
> anyone knows how to strip off the very 1st character from
> a text file, I'd be much oblidged!
>
> >-----Original Message-----
> >well it worked for me. I just tested it. Created a file
> called 1.txt and
> >put it in c:\temp. I then ran the script below and it
> created 1.htm and it
> >opened in the browser correctly.
> >
> >Set objFSO = CreateObject("Scripting.FileSystemObject")
> >objFSO.CopyFile "C:\temp\1.txt" , "C:\temp\1.htm"
> >--
> >Sorry, I am no longer including my e-mail address as I am
> getting to much
> >spam. I really have no desire to enlarge "it" by three
> inches, that is even
> >if I get e-mailed 10 times a day from different e-mail
> addresses so I can't
> >block it.
> >Besides I finally came to believe what others have said,
> if you have a
> >question, you should ask the group as others might
> benefit from it. Anyone
> >on the group who I converse with off topic or on the
> side, can easily find
> >my e-mail address.
> >
> >
> >"Doc" <deanny@att.net> wrote in message
> >news:0aa401c34bde$bcd626c0$a001280a@phx.gbl...
> >> I'm not sure, to be honest. When I manually change the
> >> extension to .html, none of the text shows up when
> opening
> >> it via browser (although it's still there & can be read
> >> when opening w/ text browser). However, if I (again,
> >> manually) open it up w/ Notepad & save as .html, the
> text
> >> shows up in the browser just fine.
> >>
> >> >-----Original Message-----
> >> >Why will renaming it not work? Saving it with a
> >> different file extension is
> >> >no different, if you're using the FSO anyway.
> >> >
> >> >Ray at work
> >> >
> >> >"Doc" <deanny@att.net> wrote in message
> >> >news:00af01c34bc9$32982f90$a601280a@phx.gbl...
> >> >> Hello,
> >> >>
> >> >> I was wondering if there was a way to open a text
> file
> >> >> (say C:\test.txt) & save it as C:\text.html. Simply
> >> >> renaming it will not work.
> >> >>
> >> >> Thanks in advance!
> >> >
> >> >
> >> >.
> >> >
> >
> >
> >.
> >