clipboard Posted March 22, 2011 Report Share Posted March 22, 2011 Hi.. I suppose this is going to be an easy solution but I've not been able to find an answer yet. I have a program which scapes info from web pages and saves the info to various files in disk. Before I start I have to delete the older stored text inputs (about 25 files of various names) so that the new info can be stored satisfactorily. There doesn't seem to be an "Empty File" option in my ME (v3.7d). Scrolling through the list of files isn't a problem but getting the existing info deleted is proving a problem. I've tried a very simple select all delete save series of text commands but the resultant "empty" files all have a blank first line!! The new text saves all begin at line 2 and because of this my program doesn't work. Any ideas how I can delete the text and start off with a pristine empty file with no blank top lines??? TIA Quote Link to comment Share on other sites More sharing options...
paul Posted March 22, 2011 Report Share Posted March 22, 2011 Simply save an unused or "empty" text variable to the desired file (by "empty", I mean a variable whose value has been set to an empty string). You'll find this feature under Variable Modify String (which is a bit odd, since we're not modifying any strings!). Quote Link to comment Share on other sites More sharing options...
kevin Posted March 22, 2011 Report Share Posted March 22, 2011 Some ideas: Would it work to delete the existing files? Try the Delete File or Files command. How are you emptying the file? From your description it sounds like you may be writing a CR/LF when writing the empty string to the file. Look for an 'Add Trailing CR/LF' option and uncheck it. Sometimes I need to start with a file that is almost empty. For example, I may want a line containing a header but no data lines. In these cases I create an 'HeaderOnly' file and copy it over the files that need to be emptied. Quote Link to comment Share on other sites More sharing options...
clipboard Posted March 23, 2011 Author Report Share Posted March 23, 2011 Thanks guys. Saving the empty text variable as Paul suggests together with unchecking the "Add Trailing CR/LF" as Kevin proposed worked brilliantly. Thanks again. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.