AMARANT Posted July 27, 2014 Posted July 27, 2014 How can I overwrite all the text in my txt file to a new one? fileWrite just adds new text at the top of the file.
AMARANT Posted July 27, 2014 Author Posted July 27, 2014 Is there any way to do that without deleting a file?
kevenvz Posted July 27, 2014 Posted July 27, 2014 Fileread the file first, place it in a variable, add ur text to a new variable and add the existing text then overwrite the file. I'm on my phone so too lazy to script it for you :3 Edit: Forgot what I said, I've read it wrong.
Bonsai Posted July 27, 2014 Posted July 27, 2014 Is there any way to do that without deleting a file? Overwrite is basically deleting. You create a new file with the same name and its overwritten.
AMARANT Posted July 27, 2014 Author Posted July 27, 2014 Well I got it. If it's the only way then I'll do it like you say. Thanks.
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now