WinBatch Tech Support Home

Database Search

If you can't find the information using the categories below, post a question over in our WinBatch Tech Support Forum.

TechHome

FAQs - Frequently Asked Questions

Can't find the information you are looking for here? Then leave a message over on our WinBatch Tech Support Forum.

Reading, Writing and Editing Files

Keywords: writing to files filewrite fileappend

Reading and Writing to Files:

Is there a way to open a file, and read and write to it during the same session? Do files only allow one or the other to occur without closing and reopening?

Files can be opened and then either read or written. You cannot do both in the same file open session. Here are some ways to read, write, and append files.

Do one of the following:

  1. Open two files, copying and modifying data from one and then writing to the other. Then rename the new file when done, and then save it.
  2. Copy data to a temporary file, and use the FileAppend function to glue two files together.

Editing:

An alternative to reading a file and rewriting to another file line by line is to use Notepad, or some other editor. Load your file into Notepad, Word, Write, or another editor, and use Sendkeysto to alter it.

Also see BinaryCopy commands or FileCopy commands


Article ID:   W12999
Filename:   Reading Writing and Editing  Files.txt
File Created: 1999:04:15:16:51:04
Last Updated: 1999:04:15:16:51:04