How to append a file directory and its contents in a jTextArea

how will i display the contents of this file and file directory in a jTextArea or ...let's say it will display the content of "c:/AutoArchive2007-05-24.csv" in a jTextarea
say this file "c:/AutoArchive2007-05-24.csv"contains the ff:details
user:jeff AutoArchive-Process Started at Thu May 24 15:41:54 GMT+08:00 2007
and ended at Thu May 24 15:41:54 GMT+08:00 2007
Message was edited by:
ryshi1264

use the append(...) to append data to the text area.

Similar Messages

  • How to move some xml element and its content to a new frame

    Hi All,
    How to move some xml element and its content to a new frame.

    Hi Chinnadk,
    Sorry my code its comment some lines. Now only I check the forum thread, you just try one more time.
    #target InDesign;
    #include "/Program Files (x86)/Adobe/Adobe InDesign CS5.5/Scripts/XML Rules/glue code.jsx"
    var myDoc = app.activeDocument;
    //____________________ XML RULE SET
    var myRuleSet = new Array (new margintag);
    with(myDoc){
        var elements = xmlElements;
        __processRuleSet(elements.item(0), myRuleSet);
    function margintag(){
        this.name = "margintag";
        //this.xpath = "//margintag[@type='mn2']";
        this.xpath = "//margintag";
        this.apply = function(myElement, myRuleProcessor){
            with(myElement){
                app.select(myElement);
                try{
                    var myPrePara = app.selection[0].paragraphs[-1].parentTextFrames[0].paragraphs.previousItem(app.selection[0].paragraphs[-1]);
                    if(myPrePara.characters[-1].contents=="\r"){
                        myPrePara.characters[-1].remove();
                    var myTextframe = myElement.placeIntoInlineFrame(["7p9","6p"]);
                    myTextframe.appliedObjectStyle= myDoc.objectStyles.item("MN1");
                    myTextframe.fit(FitOptions.FRAME_TO_CONTENT);
                    myTextframe.parentStory.paragraphs.everyItem().appliedParagraphStyle = app.activeDocument.paragraphStyles.itemByName("MN1");
                    }catch(e){}
                app.selection = null;
            return true;
    thx,
    csm_phil

  • Deleting a directory and its content

    Hi, I'm trying to delete a series of directories like this batch file does
    @echo Removing "%CD%\a"
    @rmdir /s /q "%CD%\a"
    @echo Removing "%CD%\b"
    @rmdir /s /q "%CD%\b"
    @echo Removing "%CD%\c"
    @rmdir /s /q "%CD%\c"looking at the api i found that it doesn't seem to have the option to delete a dir and its content, should i use a function like the one in thread:
    http://forum.java.sun.com/thread.jsp?forum=31&thread=188034
    or would it be better to call the batch script with Runtime.exec()? The system is windows only so i don''t need to have compatibility with *nix shells ect.
    What do you think?

    Try this
    // CLASS:    FileUtil
    // FUNCTION: An extension of File which allows various file manipulations
    import java.io.*;
    import java.net.*;
    import java.util.*;
    public class FileUtil
        extends File {
       public FileUtil(File parent, String child) throws NullPointerException {
          super(parent, child);
       public FileUtil(String pathname) throws NullPointerException {
          super(pathname);
       public FileUtil(String parent, String child) throws NullPointerException {
          super(parent, child);
       public FileUtil(URI uri) throws IllegalArgumentException, NullPointerException {
          super(uri);
       public void deleteTree() throws Exception {
          ArrayList contents = new ArrayList();
          listContents(contents);
          File f;
          for (int i = contents.size() - 1; i >= 0; i--) {
          f = new File( (String) contents.get(i));
          f.delete();
       private void listContents(ArrayList files) throws Exception {
          listContents(files, this);
       private void listContents(ArrayList files, File dir) throws Exception {
          System.out.println(dir.getAbsolutePath());
          File[] newFiles = dir.listFiles();
          File newFile;
          if (newFiles != null) {
          for (int i = 0; i < newFiles.length; i++) {
             newFile = new File(newFiles.getAbsolutePath());
         files.add(newFiles[i].getAbsolutePath());
         if (newFile.isDirectory()) {
         listContents(files, newFile);

  • Deleting directory and its contents recursively

    File clearDir = new File(dirname);
    String farr [] = clearDir.list();
    for(int i = 0 ; i<farr.length; i++){
    new File(farr).delete();
    new File(dirname).delete();
    above code only deletes directory files and directory.
    say if the there are some other directories inside,how to handle it to delete them also??

    better version with stack implementation. (not a recursive function)
    public void deleteDir(File dir){
       Stack<File> dirStack = new Stack<File>();
       dirStack.push(dir);
       boolean containsSubFolder;
       while(!dirStack.isEmpty()){
          File currDir = dirStack.peek();
          containsSubFolder = false;
          String[] fileArray = currDir.list();
          for(int i=0; i<fileArray.length; i++){
             String fileName = currDir.getAbsolutePath() + File.separator + fileArray;
    File file = new File(fileName);
    if(file.isDirectory){
    dirStack.push(file);
    containsSubFolder = true;
    }else{
    file.delete(); //delete file
    if(!containsSubFolder){
    dirStack.pop(); //remove curr dir from stack
    currDir.delete(); //delete curr dir

  • How do I sync my iPhone and its contents to my new MacBook Pro?

    Hi all.
    I've just bought my first MacBook Pro and I'm very happy with it.
    I'm just trying to set up iTunes with my iPhone which I've had over a year.
    The problem is that iTunes isn't detecting all of the apps currently on my iPhone; only the recent purchases/downloads I've made using the new MacBook Pro.
    I assume this is something to do with the fact that my iPhone is probably still 'synced' with my old Dell which is now dead.
    How do I make it so that my new MacBook Pro and iPhone talk to one another without losing all of my data/settings/layout etc of everything on my iPhone?
    Thanks in advance!

    By design, the iPhone will sync itunes content with one computer at a time. Any attempt to sync such content with a second computer will result in ALL itunes content being first erased from your phone & then replaced with the content from the second computer. This is a design feature and cannot be overridden. Because you are replacing your computer, your phone will see this computer as a "new" computer. The itunes content sync is one way: computer to phone. If you have photos that were synced to your phone or music ripped on your own that were not backed up, you will first have to extract them from your phone using third party software, before you do anything else, as Apple makes no provision to do so:
    http://www.wideanglesoftware.com/touchcopy/index.php
    Once you've done that, do the following in the order specified:
    1. Disable auto sync when an iPod/iPhone is connected under Preferences>Devices in itunes.
    2. Make sure you have one contact & one event in the supported applications(Address Book, iCal) on your computer. These entries can be fake, doesn't matter, the important point is that these programs not be empty.
    3. Connect your phone, iTunes running, do not sync at this point.
    4. Store>Authorize this computer.
    5. File>Transfer Purchases(To make sure all purchased content on your phone will be in your itunes library).
    6. Right click in the device pane & select reset warnings.
    7. Right click again and select backup.
    8. Right click again & select restore from backup, select the backup you just made. When prompted to create another backup, decline.
    9. This MUST be followed by a sync to restore your itunes content, which you select from the various tabs, You'll get a popup regarding your contacts & calendars asking to merge or replace, select merge.
    You should be good to go.

  • How do i transfer an app and its contents to new mac

    Hi,
    I've just got a new Macbook with Mountain Lion. I backed up my old Mac (Lion) using Carbon Copy Cloner - although i'm not sure whether it was a bootable back up (when i plug the external harddrive in it shows multipe folders - users, systems, library, applications etc...).
    How do I transfer Aperture , Final Cut Pro, iWork, and iLife and all of their saved contents (projects, pictures etc...) over to my new mac. The Genius today told me that because I didn't do a time machine back up I should be careful when transfering these as certain program files may have changed and will have an affect on the new machine...
    Also, I should mention that I don't have Final Cut Pro, Aperture or iWork installed on my new mac.
    Any help would be greatly appreciated...
    Thanks, Aaron

    Okay cool.
    But if the carbon copy was made on Lion and my new OS is Mountain Lion, will this have an affect on the way apps work??
    The only apps i'm worried about are iWorks (as I dont have original disk so need to transfer these apps via carbon copy), as well as iPhoto - as I have all my photos on it.
    Should I just transfer the iWork apps via drag and drop (then do any updates they say I need. and then when I drag and drop the iWork files (pages files mainly) will they work fine?
    And with the iPhoto photos, should I just drag and drop the iPhoto library file - as I won't need the App as it's already installed on my new mac...
    Just a little confused as to how my new mac will accept the Apps and it's files as they are from an older OS...
    Sorry if this is a little confusing...
    thanks so much.....

  • How to create new .dat file and its contents?

    Hi There
    Can anybody let me know the procedure of how to create new .ctl or .dat file to load data to tables.
    i working on 2day dba chapter 8. it shows me how to creat table and use .dat file to load data. but doesnot giv any clue how new .dat file and its contents can be created. please help.
    thanks in advance.

    Thanks for ur help
    I ve created txt file in notepad and saved it as dat file. tried to load that data thru Enterprise manager. used load data from User files everything went well and job was showing suceeded but dont know why that data is not showing in the table. i ve tried it now for three four times. used right table and pathe but dont know. has anybody got idea why that ll be?
    Thanks

  • How do I recover a .app and its file contents after osx "click and hold" "hit x button" delete

    How do I recover a .app and its file contents after osx "click and hold" "hit x button" delete.
    Accidently deleted rapidweaver and all of its content and paid plugins with it. all contain in its package contents. how do i restore.  I tried using recovery software.

    It is possible that you inadvertently corrupted the file while doing the edit.
    But it could also be possible that you moved the file? For iMovie to see it, it should be in the Movies/iMovie Projects folder.

  • HT201301 How do I import a garageband project folder (and its contents) into itunes?

    How do I import a garageband project folder (and its contents) into itunes so I can transfer it to my ipad?
    I am a guitar teacher and I want to use garageband for the ipad as a teaching tool for my students.  The goal is for my students and myself to share garageband project files so that both the teacher and the student can have the full project...or even add to it.
    Here's what I need help with...
    My student has created a song in garageband that has 4 tracks.  They sync their song to itunes so they can see the project folder for that song in the document window for garageband under the "apps" tab in itunes.  They click "save to" and save the project folder to dropbox. 
    I want to be able to import the project folder for that song from dropbox into itunes so that I can copy it to my ipad and have full access to my student's song.
    I appreciate any help!  Thanks!
    Pat
    [email protected]

    hi Pat,
    what you can do is add that folder to garageband directory using ifunbox. here is the step:
    - Open your ifunbox then go to "user Applications" on your left panel, then select garageband folder. You will see a folder as below:-
    "Documents"
    "Library"
    "MobileGarageBand.app"
    "tmp"
    "itunesartwork"
    "itunesmetada.plist"
    copy the folder you like to put into your ipad by copy it into "Documents" folder. and then quit the ifunbox and restart your itunes again and sync your ipad again and check if you can see the folder on your file sharing under apps tab. Wish you good luck.

  • PSE9: How do I move/copy an Album and its contents from my PC to my laptop?

    I am using Windows 7 and PSE 9 on my PC and want to get a copy of the album and its contents to my Vista laptop running PSE 9 without changing anything on the source PC. Anyone know how to do this? I know I can move the files through Windows Explorer on my network but I have already gone through the trouble of putting the best photos into an Album and would like to simply move the Album over and not have to go through the trouble of recreating it.

    You will need to copy the files.
    1. Make a new folder on your laptop
    2. Open Organizer, select your Album then press Ctrl+A to select all photos
    3. Click the Fix tab and choose Full Photo Edit to open the album contents in the editor
    4. Click File >>Process Multiple Files
    5. From the drop down menu (Process files From) choose Opened Files
    6. For destination click the browse button and navigate to your new folder on your network and click OK
    7. Make sure Rename and Resize is unchecked but check Convert files To and choose Jpeg Max quality or whatever you prefer then click OK and wait for Elements to finish.
    8. Go to your laptop folder to see your images.

  • How to append a file in a trigger?

    I'm writing from a table to a file, and have created a trigger that works great...however, I need to append the file so it doesn't overwrite the file every time the trigger fires.
    Here's the code...but I can't figure out how to append the file instead of just write to the file:
    CREATE OR REPLACE TRIGGER checkout_trg
    AFTER UPDATE OF movie_qty ON mm_movie
    FOR EACH ROW
    DECLARE
    fh UTL_FILE.FILE_TYPE;
    BEGIN
    IF :NEW.movie_qty=0 THEN
      fh:=UTL_FILE.FOPEN('ORA_FILES','chekcout.txt','w');
      UTL_FILE.PUT_LINE(fh, 'Date: '||sysdate||', Movie ID: '||:NEW.movie_id||', Quantity: '||:NEW.movie_qty);
      UTL_FILE.FCLOSE(fh);
    END IF;
    END;
    /

    > It's for an assignment...I think thye're just trying to show us what's possible.
    Just as it is possible to show a learner driver to jump a red light, drive on the wrong side of the road, or do doughnuts in an intersection...
    But none of this will make that learner driver a good driver. Never mind able to correctly handle high performance cars on the professional circuit.
    Sorry mate - what they are showing/teaching you is pure bs. A trigger is not the "same thing" as a callback event in client programming.
    And feel free to give them this URL and tell them that I think they are full of it. Let's see how they defend their non-real world, totally irrelevant and wrong assignments in this very forum.

  • Is it possible to recover a deleted folder and its contents as opposed to an individual file?

    When I turned on my computer today, a folder located on my desktop is no longer there.  Astounded I could have accidentally deleted it, the folder having been trashed is the only illogical logical possibility I can think of - and is a first for me in my 30 years of Mac use.  My father is in the process of dying and the folder contains all the information coming to me on the subject.  The last backup of this folder is about a week old and much has been added since for which I've no record.
    Not having a master document or table of contents listing what was in the folder leaving me unable to search for and recover individual files/documents by name, my question is this:  Is it possible to recover a "FOLDER", and its contents after that folder has been moved from the desktop to the trash, the trash emptied, and the computer having been shut down?
    If anyone has any ideas of how to recover anything about what items that folder contained, I'd really appreciate whatever thoughts you might have.
    Thanks in advance -
    The computer this folder is missing from is a early 2008 MacPro, running 10.7.5.

    I'm not sure what you can do beyond trying to restrict the types of files you search for. These apps normally have ways to select the file types or to add example files. That allows them to carve out only those types, but you still may end up with GB's of data, especially if the types are somewhat generic. I don't know of any tools that can undo changes to the disk catalog over time.
    I guess you could also search for specific text if you know that these files contained something that is 'almost unique'. Spotlight can do that, or grep, egrep are command line tools that may help ask if you want to go that route, they may help you gather lists to move files around to whittle them down.
    Sorry I can't think of a way around this it's a difficult task at a difficult time. Good luck with it, ask if you think we could help.
    I do wonder if Apples 'Versions' could help?
    OS X Lion: About Auto Save and Versions - Apple Support
    @Tony T1, do you know how to restore files from that system? I think it is part of Time Machine, but the copies are saved locally.
    It is not entirely clear how it works (at least from my memory of Lion) with regards to how you could get files back in this situation. The database should be at the base of the disk in a hidden folder ".DocumentRevisions-V100", but I don't think you can just pull files out of there. Personally I'd consider making a full disk backup before you attempt to restore files. Then you could try the 'Enter Time Machine' UI to see if it can browse back to the older Desktop.

  • To set a directory and its subdirectory in  utl_file_dir using command

    Hi all ,
    Please help me in this dbt .
    in one article i saw
    UTL_FILE_DIR lets you specify one or more directories that Oracle should use for PL/SQL file I/O. If you are specifying multiple directories, you must repeat the UTL_FILE_DIR parameter for each directory
    on separate lines of the initialization parameter file
    and in another alter system set utl_file_dir=dir1,dir2 scope=both;
    whther the second method is possible
    if i want to have a directory and its sub directory to set in utl_file_dir
    what i should do , whether i want to specify main directory and all sub directory seperated by comma or any other method is there
    Please help me
    thanks in advance ..........

    Instead of specifying the directory in the INIT.ora file u can use Directory object.
    U need to create a directory object once & use it when ever u require it.
    For example
    CREATE OR REPLACE DIRECTORY Test_dir AS 'C:\abc'
    Now you can use this directoryTEST_DIR in any Pl Sql block provided u have proper privileges.

  • Help me Friends - How to Delete a Folder and its contents in java

    Hi Friends
    I want to delete a folder and its contents by passing the folderpath.
    Can any one help me in this..
    Thanks in Advance
    Regards
    Krishna

    * Delete a directory including all of its content.
    * @param directory Directory path to delete.
    public static void deleteDirectory(String directory) {
    if (directory != null) {
    File file = new File(directory);
    if (file.exists() && file.isDirectory()) {
    //1. delete content of directory:
    File[] files = file.listFiles();
    int count = files.length;
    for (int i = 0; i < count; i++) { //for each file:
    File f = files;
    if (f.isFile()) {
    f.delete();
    } else if (f.isDirectory()) {
    deleteDirectory(f.getAbsolutePath());
    }//next file
    file.delete(); //finally delete (empty) input directory
    }//else: input directory does not exist or is not a directory
    }//else: no input value
    }//deleteDirectory()

  • [JS-CS4] - How to read the XML Element and its Attributes

    Dear All,
      I have the doubt regarding: reading the xmlElement and its attributes.
    Here I droping the xml script
    //============= Start ======================//
    var myDoc = app.activeDocument;
    var Fpath = File("../Projects/Entity_map.xml");
      if (Fpath.exists)
       Fpath.open("r");
       var Cont= Fpath.read();
      var roots = new XML(Cont);
      var myEveryName = new Array();
      var myEveryContent = new Array();
      var myEveryAttributes = new Array();
      traverse(roots);
    //$.writeln(myEveryName);
    //$.writeln(myEveryContent);
    $.writeln(myEveryAttributes.length);
    for(var i=0; i<myEveryAttributes.length; i++)
      $.writeln(myEveryAttributes[i]);
    function traverse(tree) {
        myEveryName.push(tree.name());
    myEveryContent.push(tree.text());
      myEveryAttributes.push(tree.getAttribute);
    // you get the contents by using .text() insted of .name()
        if(tree.elements().length() > 0) {
            for(var i=0; i<tree.elements().length(); i++) {
                traverse(tree.elements()[i]);
    //============== End =====================//
    and the XML Structure is
    //===============XML =====================//
    <?xml version="1.0" encoding="UTF-8"?>< Entity_Convertion>
    < Entitys char="Ç" GID="173"/></ 
    Entity_Convertion>
    //===============End ====================//
    Here I'm getting the XML Elements and its contents, but not xmlAttributes.
    Please any one can help me, then I will appreciate...
    Thanks & Regards
    T.R.Harihara SudhaN

    Dear All,
      I have the doubt regarding: reading the xmlElement and its attributes.
    Here I droping the xml script
    //============= Start ======================//
    var myDoc = app.activeDocument;
    var Fpath = File("../Projects/Entity_map.xml");
      if (Fpath.exists)
       Fpath.open("r");
       var Cont= Fpath.read();
      var roots = new XML(Cont);
      var myEveryName = new Array();
      var myEveryContent = new Array();
      var myEveryAttributes = new Array();
      traverse(roots);
    //$.writeln(myEveryName);
    //$.writeln(myEveryContent);
    $.writeln(myEveryAttributes.length);
    for(var i=0; i<myEveryAttributes.length; i++)
      $.writeln(myEveryAttributes[i]);
    function traverse(tree) {
        myEveryName.push(tree.name());
    myEveryContent.push(tree.text());
      myEveryAttributes.push(tree.getAttribute);
    // you get the contents by using .text() insted of .name()
        if(tree.elements().length() > 0) {
            for(var i=0; i<tree.elements().length(); i++) {
                traverse(tree.elements()[i]);
    //============== End =====================//
    and the XML Structure is
    //===============XML =====================//
    <?xml version="1.0" encoding="UTF-8"?>< Entity_Convertion>
    < Entitys char="Ç" GID="173"/></ 
    Entity_Convertion>
    //===============End ====================//
    Here I'm getting the XML Elements and its contents, but not xmlAttributes.
    Please any one can help me, then I will appreciate...
    Thanks & Regards
    T.R.Harihara SudhaN

Maybe you are looking for

  • CALL_NOT_FLUSHED error while opening word document proxy

    Hello Gurus, We are using DMS application for uploading word documents in SAP system. We are using the following code to open a document from SAP database CALL METHOD CONTROL->GET_DOCUMENT_PROXY EXPORTING DOCUMENT_TYPE = '207' DOCUMENT_FORMAT = '' IM

  • EE in Australia - Connecting to a network

    Before arriving today in Australia I checked withh EE that I would have roaming in Australia and was assured that I do, but i cannot connect to any network here. Are there any special settings I need to set on my phone - iPhone 5s? i have no problems

  • Help! Trouble Mounting Toshiba SD-M1401 DVD-ROM on Sun E250 w/Solaris 10

    I'm hoping someone can help me here...I bought a used Toshiba DVD-ROM for my E250 off Ebay, and Im trying to get it installed and mounted. I'm having some wacky problems: The driver powers up and physically seems fine. Ejects, etc. But I can't mount

  • Credit card numbers and credit cardstopped from unwanted site

    how do I stop a site so they wont have permission to use my credit card

  • Buffer cache writes

    Hi, From ADDM report i saw following message. Buffer cache writes due to small log files were consuming significant database time. Recommendation 1: Database Configuration Estimated benefit is .31 active sessions, 2.99% of total activity. Action Incr