How to save the contents of one file into another file?

Hai,
i'm trying to save the contents of an existing file into a new file...
for example.. if i'm having a ms word file namely ss.doc..
now i want to save itz contents into another file namele dd.doc..
How shall i do it..
Can an one plzz explain me...
senthil.

Hi, Senthil.
This Forum is not a general discussion forum.
You don't believe that the InDesign SDK is a general purpose API. Do you?
I think you must post issues like this where they belong, in this case in a Microsoft Word Forum.
Best regards.
Oscar.

Similar Messages

  • How to save the contents of a file(not a text file)

    Hi all, I want to save the contents of a file(,png file, not a text file) as a field in a class. Shall I have it as a string or byte array or something?
    I have tried saving a file in a string but there were some problems with loading the file from a different platform. Following is my code.
            String string;
            try {
                StringBuffer sb = new StringBuffer(1024);
                char[] characterArray = new char[1024];
                BufferedReader br = new BufferedReader(new FileReader(file));
                while(br.read(characterArray) != -1){
                    sb.append(String.valueOf(characterArray));
                br.close();
                string= sb.toString();
            } catch (IOException ex) {
                ex.printStackTrace();
            }and I use the following code to recover the string back to a stream, and save that stream back to a time later.
        ByteArrayInputStream bais = new ByteArrayInputStream(map.getBytes());I realized that because this file is not a text file, the string could cause some problems. But anyone could tell me if I should use a byte array or someting? and how?
    Any help would be appreciated!
    Cheers,
    Jing

    You should use a byte array, and the binary streams (InputStream a& OutputStream). Never use Strings and Reader/Writer if you have binary data.
    Kaj

  • How to save the content of a JTextArea into a txt file?

    Hi, I want to save the content of a JTextArea into a txt file line by line. Here is part of my code(catch IOException part is omitted):
    String s = textArea.getText();
    File file = new File("file.txt");
    BufferedWriter bw = new BufferedWriter(new FileWriter(file));
    bw.write(s);
    bw.close();
    But I found in the file all is binary code instead of text, any people can help me?
    Thanks in advance

    I can see text in the file now, but the problem is
    when I write three lines in textarea, for example
    111
    222
    333
    then I open the txt file with notepad, it is
    111222333
    How to save them line by line? Use a PrintWriter. It lets you write lines (it's the same class as System.out).
    http://java.sun.com/j2se/1.4/docs/api/java/io/PrintWriter.html

  • How to copy the content of one file into another

    I have tried this code
    try {
                   fin = new FileInputStream("file path");
              catch(FileNotFoundException exc)
                   System.out.println("File not found");
                   return 0;
              catch(ArrayIndexOutOfBoundsException exc)
                   System.out.println("Usage: Showfile file");
                   return 0;
              while(true){
                   i=fin.read();
                   if(i==-1)
                        break;
                   cnt++;
              fin.close();*/
    now in this way i can lift one character at a time and copy it into another file (note i have not done the copy part in this code but that can be implemented) however this whole procedure is taking too much time if the size of the file is too big....kindly suggest another way to copy one file into another

    have you ever copied and pasted a large file in Windows or another OS? Larger files take more time to copy, that's just how it is.

  • How do I merge the content of one website into another with Business Catalyst?

    I have two websites, each of them are Business Catalyst websites.
    I would like to merge website 1 with website 2, so they are on the same domain.
    Each website will effectively be put into it's own directory on the same domain, with the homepage allowing a visitor to decide which website they would like to see.
    Is there an easy way to do this? I have a feeling it's a matter of copying all the content across, modifying the templates and doing everything manually page by page - which wouldn't be fun.
    Any help or suggestions would be appreciated.
    Thanks,
    Sam

    Hi alberon-sam,
    You will need to migrate your site as mentioned in this article: http://kb.worldsecuresystems.com/203/bc_2038.html?bc-partner

  • How to show the contents of one dropdown in another dropdown

    hi all
    i have 2 dropdownlists
    i created a dropdownkey ui and inserted values into dropdown dynamically.  let us say i have months in the dropdown , and when i select a month name in the first dropdown i want to display the festival names of that particular month in the second dropdownlist.
    please guide me
    Thanks and Regards
    narayna Adhurthi.

    Hi Narayan,
    You can achieve this functionality by following Bhavik's suggestion. If you do not want to create the second drop down's data dynamically, I can give you a suggestion.
    Create simple types for each month's festival list. Create twelve attributes each's type being one of the created festival type. Let's call these attributes attr1,attr2....attr12. On selecting a value from the first dropdown, change the binding of the 'selectedKey' of the second dropdown to a corresponding attribute.
    For this in the doModify(), write the following lines of code :
    String selected_key_for_drop1 = wdContext....get<attribute bound to the first drop down>;
    IWDViewElement elmt = view.getElement("<your second dropdown's ID>");
    IWDDropDownByKey drop = (IWDDropDownByKey)elmt; 
    if(selected_key_for_drop1.equals("Jan"))
       drop.bindSelectedKey("attr1");
    else if(selected_key_for_drop1.equals("Feb"))
       drop.bindSelectedKey("attr2");
    Hope this helps,
    Best Regards,
    Nibu.

  • How to merge the objects of one rpd into another rpd in OBIEE.

    Hi to all,
    I am new user to OBIEE. I was given a task to merge two repositories. I tried a lot but couldn't do it. I went through many forums and discussions to find the relevant answer but couldn't find anything. Actually my requirement is to merge two repositories. For example, consider two repositories namely rpd1 and rpd2 respectively. Both repositories has their own set of objects. I just want all the objects of rpd2 to merge with rpd1 under the name rpd1. Is it possible? If it is possible... Please anyone let me know the steps to do it.
    Thanks in advance
    Thenmozhi

    Hi,
    See the below URLs will help you,
    http://varanasisaichand.blogspot.com/2010/03/how-to-merge-two-repositories.html
    http://gerardnico.com/wiki/dat/obiee/bi_server/obiee_repository_merge
    http://oraclebizint.wordpress.com/2008/03/24/oracle-bi-ee-101332-merging-repositories-substitute-for-import-from-repository-2-way-merge-with-no-parent-part-2/
    Thanks,
    Balaa...

  • How to read the content in one node of XML in Java? Pls help

    My dear brothers,
    I am a newbie of XML, I have a exercise which is creating a Tree View from XML file. But the trouble is I do not know how to read the content in one node of XML file. I decide to use the algorithm as following:
    1. Create a GUI form which gives the ability for user to choose a XML file (ok)
    2. Load XML and return the file (ok)
    3. Read the file from node to node to create the node in Tree View (?!)
    Please help me, and if you are enough kind, please give me an small example to easy understand. Thanks in advance.
    Hoang Yen Binh

    I hope this one helps you.
         <ABC Type="ProductBased" ProdName="One" Location="India">
              <CEO>Raj</CEO>
              <Finance>Vikram</Finance>
              <HR>Karthik</HR>
              <Technical>Satish</Technical>
         </ABC>
    import javax.xml.parsers.DocumentBuilder;
    import javax.xml.parsers.DocumentBuilderFactory;
    import org.w3c.dom.Document;
    import org.w3c.dom.Element;
    import org.w3c.dom.NamedNodeMap;
    import org.w3c.dom.Attr;
    import org.w3c.dom.NodeList;
    import org.w3c.dom.Node;
    import org.w3c.dom.DOMException;
    import javax.xml.parsers.ParserConfigurationException;
    import org.xml.sax.SAXException;
    import java.io.File;
    import java.io.IOException;
    public class XmlReading {
         Document doc;
         Element element;
         public static void main(String[] args) throws Exception{
              XmlReading xr = new XmlReading();
              xr.getXmlParser(args);
         public void getXmlParser(String[] args) {
              DocumentBuilderFactory factory = DocumentBuilderFactory.newInstance();
                   if(args.length != 1) {
                        System.err.println("Argument Required");
              try {
                   DocumentBuilder builder = factory.newDocumentBuilder();
                   doc = builder.parse(new File(args[0]));
              }catch(ParserConfigurationException e1) {
              }catch(SAXException e2) {
              }catch(IOException e3) {
              getAttributes();
         public void getAttributes() {
              // Retrive the entire Document from the Dom Tree
              element = doc.getDocumentElement();
    //          System.out.println(element);
              NamedNodeMap attrs = element.getAttributes();
              // Get number of attributes in the element
         int numAttrs = attrs.getLength();
         // Process each attribute
              for (int i=0; i<numAttrs; i++) {
                   Node node = attrs.item(i);
                   // Get attribute name and value
                   String attrName = node.getNodeName();
                   String attrValue = node.getNodeValue();
                   System.out.println(attrName + ": " + attrValue);
              String s1 = element.getTagName();
              System.out.println(s1);
              // To get all the elements in a DOM Tree
              NodeList nl1 = element.getElementsByTagName("*");
              int i2 = nl1.getLength();
              System.out.println(i2);
              for(int i=0; i<i2; i++) {
                   System.out.println(nl1.item(i) + "\n");
    }

  • How to store the contents of a file

    Hi,
    I'm using forms6i and database 10g.
    Through forms if a user selects a filename , and clicks a button or something,
    the contents of the file should be saved in the database.
    The file can be of any type, like .doc,.pdf,.xml,.html etc...
    and the contents filed will be of type varchar
    Please help me do this..
    Thanks

    Do you really want to save the "Content" of a file or the file itself? If you try to save the contents of a .doc or .pdf in a column with a VARCHAR2 datatype, you are going to corrupt the contents of the file since these file types have binary data in them as well as text. I think you would have greater success storing the actual file in a BLOB column.
    Here are a few Oracle Support documents that discuss how to store and retrieve files stored as BLOBs in the database.
    Doc ID: 168277.1 - How to Upload Binary Documents Back to Database BLOB Column from Forms
    Doc ID: 330146.1 - How to write BLOBs Stored Inside the Database Out to Files.
    Hope this helps,
    Craig B-)
    If someone's response is helpful or correct, please mark it accordingly.

  • How to save the music received in Whatsapp into iPhone?

    How to save the music received in Whatsapp into iPhone?

    This is not an iphone-specific problem. The person who sent you the files should have known that you cannot save them from WhatsApp person  on any smart phone
    Best help is to Contact whatsup support for iOS at  [email protected]
    I understand you think this is a Apple problem but Apple Haven't created this App

  • How to transfer the logins from one instance to another instance in sql2008r2

    how to transfer the logins from one instance to another instance in sql2008r2

    Hi Ganesh,
    According to your description, you want to know how to transfer the logins from one instance to another instance for SQL Server 2008 R2. To do this, besides dave’s post, you could also use
    'Copy Database Wizard' in SQL Server Management Studio, or the component
    'transfer Login task' in SQL Server Integration Services.
    Regards,
    Michelle Li

  • How to mirror the screen from one ipad2 to another ipad2?

    How to mirror the screen from one ipad2 to another ipad2?
    When writing in f.ex. Pages on one iPad i wish to see it in realtime on the other ipad.
    How is that done???

    That functionality is not built into the iPad, so you'd need a third-party app of some sort. I'm not aware of any app that allows mirroring from one iPad to another iPad, but perhaps someone else will know of something I've missed.
    Regards.

  • OpenScript: 1.     How to move the scripts from one location to another location. in OpenScript; Copy, paste or Import, export

    How to move the scripts from one location to another location. Copy, paste or Import, export

    Both way you can do.. Difference is - if you copy paste to another folder script dependencies will not move with the same( ie Assets added), whereas if you export and import the script all dependencies will be correlated automatically

  • How to get a value from one item into another

    How can i get value from one item into another item.
    Ex: I have a report, in there i have check boxes, and when i have checked some rows, and press submitt, a prosses computates it into a item on another page, and a branche redirects to page 3. Then i'm going to use the value in the item into a PL/SQL script in an report to show the submittet items.
    How can i do this?
    Computation script, pages and all that is fixed. But i dont know which PL/SQL statement to use to get th value from the item.

    Hi Fredr1k,
    Use the V() function from pl/sql.
    e.g. V('P3_MY_ITEM')
    will return the value of that page item.
    As long as the pl/sql is called from within the Apex environment.
    Regards
    Michael

  • I would like to copy all the songs from one Ipod into another. All the songs are into my Itunes account, I tried to drag and drop the songs from the old Ipod to the new one but it doesn't work. Is there a way to do it ?

    Hello everybody,
    I would like to copy all the songs from one Ipod into another. All the songs are into my Itunes account, I tried to drag and drop the songs from the old Ipod to the new one but it doesn't work. Is there a way to do it ?
    I share one Itunes account with other people from my family and one person would like to keep the same songs on the new Ipod as the ones which were on the old one.
    Thanks in advance for your answer.
    Yan

    Hello Chris,
    Thanks for your answer. I was hoping for an easier answer. Too bad there is no drag and drop solution, it would have been much easier.
    Thanks for answering so fast.
    Bye.
    Yan

Maybe you are looking for

  • Login URL and External Applications

    Are there any guidelines for finding the login URL's for External Applications? For example, if you want to set up E*Trade as an External Application, you go to https://www.etrade.com and look at the source. You find that form that submits the user i

  • Rounding to nickel formula...

    Hi, I have a formula for rounding a value to the nearest nickel. It seem that it does'nt work propably. The value of tempCalc after calculation is 3245.421123 and the result should be 3245.40 but I receive 3245.45 instead. // round to the closest nic

  • Dms content repository not running

    Hey friends, While creating content repository i went oac0 gave the clicked in create gave the details selected dms as document area, storage type as 04 http content server. Gave version 0046, port number as 1090, server name and server script as det

  • SQL2310N the utility could not generate statistics: error "-911"

    Hello, we have a 46c system with DB V.8.2.2. Everytime we planned over db13 the runstat_all we get an error message. Errormessage: Error -2310 in dmdb6upd.c(687): SQL2310N the utility could not generate statistics: error "-911" Regards, Alexander Tür

  • Formatted Search totaling several fields on unsaved form

    Hello Experts! I am trying to create a formatted search to total several UDF's, at the row level of a quote, without first having to save the record. HELP. I have tried everything except the correct syntax. $[38.U_COSTPLUS.1] * $[38.Quantity.1]     A