
Search for and Replace strings in a text file
David,
Check Open, Line Input and Instr() in the Help Files. That should get you
started at least.
HTH,
Marsh
Quote:
>Hi all...
>Here's my roadblock de jour.
>I'm automating an application to repair/compact, then zip up, then ftp the
>back end tables for replication purposes. Here's the glitch...
>I have a script file (update.scr) that I use in the ftp process. It logs
me
>onto the ftp server, changes the local directory to the folder containing
my
>zip file, and sends it to the ftp server. Problem is the local directory
>may vary from computer to computer.. so I decided I would just get the
>correct path, then edit the script file with vba. This is turning out to
be
>more difficult than I thought!
>Could anyone give an example of code to open the file, read it one line at
a
>time (it has line breaks of course) and if that line meets a criteria,
>replace it with a new one and save the file?
>Thanks in advance!
-----------== Posted via Newsfeeds.Com, Uncensored Usenet News ==----------
http://www.newsfeeds.com The Largest Usenet Servers in the World!
------== Over 73,000 Newsgroups - Including Dedicated Binaries Servers ==-----