How to rename textfile
I found that I could not delete lines of my comma delimited text file using the ISAM driver. As a work around I've created a loop which searches for text matching the line to be deleted. Each line is examined, if the text does not match, it's printed to a temp text file if does match, it loops back to continue printing the rest of the lines to the tempfile which is then closed.
Now I need to either rename the temp file as the permanant file or find a way to overwrite the contents of the temp file to the permanant file. Suggestions?
To rename a file in VB code use Name directive:
Name <current file> As <target file>
You can use VB's Kill statement to delete the permanent file, then the Name statement to rename the temp file.
Please post questions to the forums, where others may benefit.
I do not offer free assistance by e-mail. Thank you!
Thank you both for your replies. Those commands should be very useful. I've suddenly hit another bug (that wasn't there before) but I'll save that problem for another post.
Top DevX Stories
Easy Web Services with SQL Server 2005 HTTP Endpoints
JavaOne 2005: Java Platform Roadmap Focuses on Ease of Development, Sun Focuses on the "Free" in F.O.S.S.
Wed Yourself to UML with the Power of Associations
Microsoft to Add AJAX Capabilities to ASP.NET
IBM's Cloudscape Versus MySQL