Longer answer: First of all, we need to note that this is not a limitation of ASP, of the FileSystemObject, of VBScript, or of the Windows operating system. There is no system in the world, on any kind of computer, that allows any of those operations.
To understand why, you have to understand how data is stored on a disk, especially data in the form of a text file.
A directory entry (a file name) simply points to a starting point of the disk. (Perhaps something in the form of "start at block number 77123".) And then the data starts at that spot and continues, without interruption, to the end of the block. If the data is larger than a block, then again the directory (typically...there are other schemes possible, though none that I know of used in modern operating systems) points to the next block to be used. Again, the data continues at the start of the next block and continues to the end of it. The process is repeated until all the data is written to the disk.
Now, can you dream up a scheme whereby you could insert or remove some data from the middle of that file???
Effectively, you'd have to find a way to "stretch" or "shrink" a block on the disk, wouldn't you? But blocks are always a fixed size (in fact, excepting for a few mainframe operating systems, they are always the same size throughout a given disk drive). You can't change their size! So you can't insert or delete data. Period.
The only way to alter the contents of a text file (other than by appending data to the end of it--which is allowed by Windows) is to read all the data (the entire text file) into memory, change the data, erase the original file, and then write the new data back to the same file.
Some of the products that appear on this site are from companies from which QuinStreet receives compensation. This compensation may impact how and where products appear on this site including, for example, the order in which they appear. QuinStreet does not include all companies or all types of products available in the marketplace.