How to clear contents of a file

Hello,
I have a file which has some  characters written into it, I want to clear the file how can I do this?
Say I have word called "LabVIEW" , I need to clear this word and final result should be empty file.
or I need to replace the contents by writing "NI" into the file, but when I do this I still find other characters from LabVIEW word.
Thanks in advance
Solved!
Go to Solution.

ab
Attachments:
clear.png ‏2 KB

Similar Messages

  • How to parse contents from XML file in Java

    Hi All,
    I have a scenario like this . I have one xml file with key value pairs of ( name , URL ) . I have retrieved contents from XML file , now I want to parse these contents and store in a bean object.
    How to parse Contents of XML file??
    Thanks in advance,
    Rajendra.

    Hi All,
    I have a scenario like this . I have one xml file with key value pairs of ( name , URL ) . I have retrieved contents from XML file , now I want to parse these contents and store in a bean object.
    How to parse Contents of XML file??
    Thanks in advance,
    Rajendra.

  • (Need Help) how to clear the recently opened file list on Flash Player 11?

    excuse me pals, may i ask how to clear recently opened file list under "File" tab on Flash Player 11 (the standalone player) ? i've tried to browse my registry but i can't find the solution (and i can't find the .mru files containg the list). my OS is Windows 7 32bit, i hope i can find solution here

    I found it in the Windows registry under HKCU\Software\Macromedia\FlashPlayer

  • How to write content of the file under folder

    Hi Experts,
    I have following scenario, I have list of files under folder in local desktop(for eg D:\mani)
    I have only filename, using this filename i want to search and get content of the particular file and write in some other location? how to do that? give your suggestions?
    Regards,
    P.Manivannan

    You could go two ways here:
    The first possibility requires that (a) you know what operating system you are working with, and (b) you only need to copy the file, and not do anything else with the contents of it. In this case, probably the easiest way to do this is to use a Runtime exec command for the file you want to copy:
    java.lang.Runtime.getRuntime().exec( "cp D:\mani D:\mani2" );Otherwise, if you need your code to be portable, you can't assume anything about the operating system. Since java.io.File doesn't provide a copy method, you will need to read the entire contents of the file into the vm, and then write them out to a new file. Also, if you need to use the contents of your file in some other way, as well, then you also need to read the entire contents into the vm. In this second case, how you read the file may depend on what kind of data the file contains.
    In general, the following code should work for you:
    final FileInputSteam  fis = new FileInputStream ( new File( "D:\mani"  ) );
    final FileOutputStream fos = new FileOutputStream( new File( "D:\mani2" ) );
    final byte [] buf = new byte[ 1024 ];
    int bytesRead;
    while ( ( bytesRead = fis.read( buf ) ) != 0 )
        fos.write( buf, 0, bytesRead );Don't forget to catch or throw IOException.
    Hope this helps.
    - Adam

  • How to clear trc and log files in unix

    How to clear alert log/trace and diag files in unix , database is 11g R2 , is there any way to setup jobs through EM(we are using 11g EM)

    appsguyflorence wrote:
    How to clear alert log/trace and diag files in unix , database is 11g R2 , is there any way to setup jobs through EM(we are using 11g EM)
    Create a script job to rotate / delete old files for example older than 1 month, etc
    Cheers

  • How to get contents of a file

    Hi,
    I'm using Database10g.
    I want to store the contents of a file in the database.
    The file can be of different format, like .doc,.pdf,.xls,.html etc..
    So what is the best way to store and retrieve the contents of the file..
    Thanks

    off course........BLOB data type

  • How to remove content from a file?

    i making a student system, whereas students can add their information in text file to the system.
    Format as followed
    firstname
    familyname
    student number
    firstname
    familyname
    student number
    firstname
    familyname
    student number
    how do we remove any certain info

    I think the easiest way is to read the file - manipulate the data in your application - write the data to the file with deleting the old content (append=false)

  • 11g - how to clear cache by bat file

    hi, experts,
    in 10g, it is able to clear the cache using bat file.
    by bat file, I can set a windows schedule to clear the cache
    for 11g, how to do this?

    Please look into these two blog posts to create the batch file you need:
    http://shivabizint.wordpress.com/2010/12/22/purge-bi-server-cache-in-obiee11g/
    http://www.skurabigroup.com/blog/?p=659
    Hope this helps.
    Thanks,
    -Amith.

  • How to clear the PCD_LOG.LDF file

    Hi all,
    Can anyone tell me how the file PCD_LOG.LDF can be cleared? It has grown so much. Does anyone know what this log contains and is used for?
    Thanks,
    Erik

    Hi Erik,
    the PCD_LOG.LDF file is the LOG file from the PCD database of the portal.
    The quickest way to shrink a log file is to detach the database, delete/move/rename the log file, and reattach the database. MS SQL will create an empty log file. You can use SQL Enterprise Manager for attaching and detaching the database (if you are using MS SQL Server).
    <b>Before and after doing this, I suggest you backup the entire database!!!</b>
    Another possibility is to shrink the log-file.
    Here is how you use SQL Enterprise Manager for doing that:
    1. Open Enterprise Manager and expand the "databases" leaf in the Server where the database resides
    2. Right click on the "PCD" database
    Select All tasks -> Shrink database
    3. Since you only want to shrink the log file, click on "Files..."
    4. Select the log file
    5. Select "Compress pages and then truncate free space from the file"
    6. Click ok
    Hope this helps,
    Robert

  • How to update content of a file on server using a Java Applet?

    Hi,
    I'm new to Java, and I have a task now to overwrite a text file on a server using an applet. I have written a piece of code which compiles but doesn't work. Can you please take a look at the code or give me another way to do it?
    Thanks.
    Code:
    import java.applet.Applet;
    import java.io.*;
    import java.net.*;
    public class test2 extends Applet{
    public void init() {
    StringBuffer buf = new StringBuffer();
    try {
         String output = "this is some string";
         URL aUrl = new URL (getCodeBase().toString() + "test.txt");
         System.out.println(aUrl);
         URLConnection con = aUrl.openConnection();
         con.setDoOutput(true);
         PrintWriter out = new PrintWriter( new BufferedWriter( new OutputStreamWriter(con.getOutputStream())));
         out.println(output);
         out.close();
    catch (MalformedURLException mue) {
         System.out.println("improper url");
         mue.printStackTrace();
    catch (IOException e) {
         System.out.println("io exception");
         e.printStackTrace();
    }

    Ram.ViSolve wrote:
    869975 wrote:
    Thanks. I knew there would be a security issue, but I do not have sufficient knowledge to get around it. If you have a reference how to configure a server please post it here.You need to create Signed Applet. Because normally applets have some restriction to access the files in the client machine. Signed applets overrides the restriction.
    To know more, Read [url http://192.9.162.55/developer/onlineTraining/Programming/JDCBook/signed.html]Signed Applet
    No. Our OP wants to write to the server, not to the client! And to achieve this from an applet, you don't need it signed, iff the server is the machine from where the applet was downloaded in the first place. You only need to use a mechanism that allows you to write to servers, which HTTP is not. FTP, on the other hand, if setup properly can do it. So instead of trying to write using an HttpURLConnection (OP's attempt), you would use an FTP client library. FTP here is just an example and probably not the best way. Another option is to use some servlet or PHP or ASP on the server side and the applet will sumbmit the changes to that code on the server, which in turn will write to the file. The idea is that you need some 'partner code' on the server, be it the FTP server or the servlet/PHP/ASP code. None of this requires the applet to be signed.

  • How to read contents of a file version using version url

    Hi,
    I have a file in a document library say "MyFile.txt". Versioning is enabled and there are three version of it
    What i want now is that , by passing the url of version i got from SPFileVersion class, i must be able to read the contents of it.
    Can anyone pls help me
    Arjun Menon U.K

    You can use the following line of code to get the content of a specific version
    SPFolder fld = web.Folders["Documents"];
    SPFile file = fld.Files["Documents/MyFile.txt"];
    //specific version
    SPFileVersion version = file.Versions[1];
    //Get the data
    byte [] dBytes = version.OpenBinary();
    Refer to the following posts for more information, hope it helps
    http://blogs.msdn.com/b/karthick/archive/2006/03/28/563045.aspx
    http://social.msdn.microsoft.com/Forums/sharepoint/en-US/8d2619bf-34e9-421b-85c1-792b2a9e8ae9/spfileversioncollection-specific-version?forum=sharepointdevelopmentlegacy
    --Cheers

  • How to write contents of one file to another file

    We have some file Recon80 (RECON80HB01141005.TXT) which need to be modified . i.e we need to add 2 more columns in the file and write the file record into other file with trailer information. Please suggest to accomplish along with code snippet in SSIS 2008.
    PFA

    Easiest way is to use script task to add header and footer information. 
    http://agilebi.com/jwelch/2008/02/08/adding-headers-and-footers-to-flat-files/
    Please Mark This As Answer if it solved your issue
    Please Mark This As Helpful if it helps to solve your issue
    Visakh
    My MSDN Page
    My Personal Blog
    My Facebook Page

  • How to load content of my text file into a Vector?

    Hi!
    Two questions.
    Let say I have used BufferedReader(new FileReader(c:/java/MyText.txt)) to read from MyText.txt file. I want to know how to load content of this file (every line describe each photo in my photo-set) into a Vector? And how to associate lines of MyText.txt as an elements of the Vector?
    I am trying to do something, but no results.
    try{
    BufferedReader reader = new BufferedReader(new FileReader("c:/java/Applications/MyText.txt"));
    String str=reader.readLine();
    JList myList = new JList();
    StringTokenizer st = new StringTokenizer(str,"\n");
    Vector vr = new Vector(25);
    while(st.hasMoreTokens()){
    String nextToken = st.nextToken();
    vr.addElement(nextToken);
    myList.setListData(vr);
    TA1.setText(TA1.getText()+
    (String)myList.getSelectedValue());
    }catch(IOException evt) {};

    BufferedReader reader = new BufferedReader(new FileReader("c:/java/Applications/MyText.txt"));
    Vector photos = new Vector(0,0);
    while(reader.ready())
       photos.addElement(reader.readLine());
    }good luck,
    Felipe

  • Clear contents in jtable swing

    How to clear contents from jtable in java swing?

    Remove them from your data model and update the view...

  • How to delete contents of a csv file except header using powershell

    Hi,
    I am trying to delete all the content of my csv file except its header. currently I am using clear-content but using this headers are also getting deleted. Basically I need a command which deletes all the rows of a csv file except first row.Please help.

    I'm only going to respond to prove that the useless troll is useless and wrong.
    Perhaps someday the troll will finally realize that it is worthless and will go away. No one cares about what it has to say and no one has ever found it to be helpful. Even good information is bad information when it is presented in an insulting, blathering,
    incoherent, and belittling tone. Plus, I think it's really funny when something tries to justify its own sad existence by making itself feel superior (when it clearly isn't). Sometimes I almost feel bad for it, but then it reminds me of how big of a jerk it
    really is.
    Get a life, get some friends, just go do something that isn't totally worthless (yeah, I know, you can't..).
    Don't retire TechNet! -
    (Don't give up yet - 12,700+ strong and growing)

Maybe you are looking for