I have lines of text throughout the file that contain paths to other "different" types of files. Isnt' their a simple readfor. But I think your real problem will be identifying the text to remove.
A RegEx would be the simplest way to process the file contents. ReadAllText txtStatFile. Text reader. Substring reader. I currently have the below. It runs without error but does not replace the text within the desired file. WriteAllText txtStatFile. Text , reader, True. I'm not sure what your second line of code does, but I don't think it does what you want. Upgrade to Microsoft Edge to take advantage of the latest features, security updates, and technical support. Feedback will be sent to Microsoft: By pressing the submit button, your feedback will be used to improve Microsoft products and services.
Privacy policy. Thank you. Microsoft makes no warranties, express or implied, with respect to the information provided here. This example deletes the file Test. The following table lists an example of a task involving the My. DeleteFile method. Woo two birds with one stone hehe, call me Devon. Glad i could help Kind Regards Devon. Post Reply. Similar topics Java. Delete Files and Process Problem. Visual Basic.
Recursive file delete keeping folder structure. Help: I can't delete a file on a mapped network drive using vb. Overriding new and delete. Delete Directory not working. Adding a new footer. Nested class structure question. Opening Balance. Undesired Name? PowerShell Forums. PowerShell on TechCommunity. June 11th, Except that this file name is dynamic: if the name of the document changes ScriptingGuy1 June 12, I have a file that has the name BackupFile Each morning I would like
0コメント