AMARANT Posted July 27, 2014 Share 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. Link to comment
Et-win Posted July 27, 2014 Share Posted July 27, 2014 Just use fileCreate and recreate the file Link to comment
AMARANT Posted July 27, 2014 Author Share Posted July 27, 2014 Is there any way to do that without deleting a file? Link to comment
kevenvz Posted July 27, 2014 Share 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. Link to comment
Bonsai Posted July 27, 2014 Share 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. Link to comment
AMARANT Posted July 27, 2014 Author Share Posted July 27, 2014 Well I got it. If it's the only way then I'll do it like you say. Thanks. Link to comment
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