How can FMS create a text file and write data into it in the Server application folders?

Recently, I writed a programe about creating a text file and writing data into it in the server application folder. My code is as following:
           var fileObj = new File("/MyApp/test.txt");
           if( fileObj !=  null)
                  if(fileObj.open( "text", "append"))
                        fileObj.write( "                                                      ———— Chat Info Backup ————\r\n" );
                        fileObj.close( );
                        trace("Chat info backup document :" +  fileObj.name + " has been created successfully!");    
But when I run it, FMS throw the error as following: File operation open failed  ;  TypeError: fileObj has no properties.
Can you help me ? Thanks in advance.
Supplement: The text file named test.txt doesn't exist before create the fileObj, an instance of File Class.

Is MyApp the name of the application directory, or is it a child of the application directory? If myApp is the app name, just use test.txt as the path flag in the file constructor.

Similar Messages

  • How to activate another worksheet in excel file and write data into it

    Hi,
    I am writing an automation program to collect test data and write the data to an excel file.
    The excel file has several worksheets and now I can only write data to one sheet. Can anyone please let me know how to activate another worksheet and write data into it? Thank you very much.

    You can do a search in the Example Finder for more Excel VIs.
    They will give you a clearer idea of how to go about doing things in the way you need.
    - Partha
    LabVIEW - Wires that catch bugs!

  • How to open an Excel file and write data into it.

    Hi All,
    I have an excel template, which has graphs and some tables containing corresponding data. If i change the data in tables it changes the graphs. So, if i have a template in the server, is it possible for me to open this excel file and change the data in the tables to chanage the graphs. How can i go to different worksheets and go to different cells and change the values and save the file.
    Thanx in advance
    Cheers
    Pej

    You can setup an ODBC connection to the Excel file and update the file with JDBC, using the JDBC-ODBC bridge.
    Hope this helps

  • ITunes how can i create a new file and put only some songs on it? I have a hard time understanding iTunes.

    I'm trying to make a new file for iTunes music. I'm really confused on how it all works. can anyone help

    Launch iTunes with the Shift key held down, create a new library, and import your music to it.
    (119794)

  • How can I create a slide show and insert it into an email

    I created a slide show of some pictures I want to share with my sales associate but can't seem to figure out how to Email it.  any help would be appreciated!  Thank you!

    You will need to export it as a  QuickTime movie and share that.
    That said, movies are big files and many recipients will be less than delighted to get large attachments that can cause them problems in their mailboxes. Better to upload the movie somewhere and then email them a link. Dropbox is an excellent way to do this.]
    Regards
    TD

  • How can I create a GIF file ?

    Does anybody know, how can I create a Gif file with LV.
    I had used the print option (Print to HTML file) from LV but I can't use it
    when I
    create an application with appbuilder.
    Does anybody know another way to carry it out?
    Thanks in advance

    You understood me correctly but the properties of the documentation tool
    doesnt exist
    after building the application (Runtime Version). Only the Menu "File /
    Print Window" option is present. Therefor I looked for another way to do it.
    "Dennis Knutson" schrieb im Newsbeitrag
    news:506500000005000000A24C0000-1004225886000@exch​ange.ni.com...
    > I was talking about the properties of the documentation tool which
    > creates an html file and allows for the selection of GIF as an image
    > format. The GIF files are the front panel, diagram, and icon. You
    > didn't specify what you are trying to print but if you need something
    > else, let us know.

  • Create xml file and write data in to it:

    Hi All,
    I have a small requirement here.....
    I have a java program which reads a xml file.
    Now i have stored the contents of that file in to a java object.
    I want a sample code now which would take theabove mentioned java object as an input ,create a xml file and write these entries in to the file.
    Can anyone help me in this?
    Your help would be appreciated.
    Thanks in advance.
    vrkr

    Hmmm. There is nothing special about an XML file to any other file. The data is simply formatted in a certain way. So to write an XML file, it is no different to writing any other form of file in Java (assuming you know the structure of the xml format to write - which you should)
    If you don't know how to write files using Java I would suggest using the Java Tutorial found on java.sun.com and do some reading up about I/O since this is fairly fundamental.
    http://java.sun.com/docs/books/tutorial/
    http://java.sun.com/docs/books/tutorial/essential/io/index.html

  • How can I create an Excel file?

    Hi,
    How can I create an Excel file using Forms 6i.
    What I'm doing is to create a file using TEXT_IO package an name it .XLS. If a read it double-clicking over the file, it opens Ok but If I open directly from Excel it opens the Convert dialog.
    I need to create an excel file as it was made from within Excel.
    Thank in advance,
    Benjamin

    When you are talking about subfiles, are you talking like Package contents of an application?
    Terminal application in Applications -> Utilities can give a command line grasp of all your files using the du command.
    Type
    man du
    when entering the terminal, followed by the enter key.
    Note, by default the terminal opens at the Home folder.   To navigate outside the Home folder enter "/Volumes/name of mounted drive/folder/subfolder" as your path.  If there are spaces in the name, putting quotes around the whole path can help.    If you end your du command with a > name.txt a text file with the name name.txt will be plugged into your Home directory.  That you can open with Excel and parse by /es thus giving you everything in Excel.

  • How can one  read a Excel File and Upload into Table using Pl/SQL Code.

    How can one read a Excel File and Upload into Table using Pl/SQL Code.
    1. Excel File is on My PC.
    2. And I want to write a Stored Procedure or Package to do that.
    3. DataBase is on Other Server. Client-Server Environment.
    4. I am Using Toad or PlSql developer tool.

    If you would like to create a package/procedure in order to solve this problem consider using the UTL_FILE in built package, here are a few steps to get you going:
    1. Get your DBA to create directory object in oracle using the following command:
    create directory TEST_DIR as ‘directory_path’;
    Note: This directory is on the server.
    2. Grant read,write on directory directory_object_name to username;
    You can find out the directory_object_name value from dba_directories view if you are using the system user account.
    3. Logon as the user as mentioned above.
    Sample code read plain text file code, you can modify this code to suit your need (i.e. read a csv file)
    function getData(p_filename in varchar2,
    p_filepath in varchar2
    ) RETURN VARCHAR2 is
    input_file utl_file.file_type;
    --declare a buffer to read text data
    input_buffer varchar2(4000);
    begin
    --using the UTL_FILE in built package
    input_file := utl_file.fopen(p_filepath, p_filename, 'R');
    utl_file.get_line(input_file, input_buffer);
    --debug
    --dbms_output.put_line(input_buffer);
    utl_file.fclose(input_file);
    --return data
    return input_buffer;
    end;
    Hope this helps.

  • How can I create a jar file

    Hello!
    How can a create a jar file?
    I want to run an application just clicking in a icon.
    How can I do this?
    Thanks a lot.
    K�tia.

    Get to the command prompt
    change directories to the directory where the main class resides.
    Open your text editor and type the following in it:
    Manifest-Version: 1.0
    Main-Class: NameOfMainClass //Just name without ".class"!!!
    Created-By: Your Name Here
    Save this file as whatever you want to name it with ".mf" as the extension.
    Then go back into the command prompt and type the following:
    jar cfm "NameOfJarFile".jar "NameOfManifestFile".mf *.class
    (without the quote marks of course)
    Hit "Enter"
    This will jar it up and make it executable.
    If you have any images associated with the program you can add them in the same way as above. Just add *.gif or *.jpg after the *.class portion.
    Good luck!
    LEEMAX I. T.

  • How can I Create a exe file were a tab control on it work`s

    I have a VI with many controls and indicators,these are spread on a tab control.This tab control works with out any problems but if i create a exe file then the tab control is fixed. How can I create a exe file so that the tab control on it work´s ?"
    Attachments:
    project7.1.jpg ‏129 KB

    Make the tab control a control and not an indicator. If you want to write
    to it you need to create a local variable.
    "Carlos-R." wrote in message
    news:[email protected]..
    I have a VI with many controls and indicators,these are spread on a
    tab control.This tab control works with out any problems but if i
    create a exe file then the tab control is fixed. How can I create a
    exe file so that the tab control on it work´s ?"

  • How can I create a exe file with a tab control on it that work´s ?

    I have a VI with many controls and indicators,these are spread on a tab control.This tab control works with out any problems but if i create a exe file then the tab control is fixed. How can I create a exe file so that the tab control on it work´s ?

    I have made a new Posting with the same question but this time I added a screenshot of the VI.
    Attachments:
    project7.1.jpg ‏129 KB

  • How can i make shorten systemlog files and joblog files on OS

    Hello
    How can i make shorten systemlog files and joblog files on OS

    Hello Jan,
    You can limit the size of system log.
    The size of the application server's System Log is determined by the
    following SAP profile parameters. Once the current System Log reaches
    the maximum file size, it gets moved to the old_file and and a new
    System Log file gets created. The number of past days messages in the
    System Log depends on the amount/activity of System Log messages and the
    max file size. Once messages get rolled off the current and old files,
    they are no longer retrievable.
    rslg/local/file /usr/sap/<SID>/D*/log/SLOG<SYSNO>
    rslg/local/old_file /usr/sap/<SID>/D*/log/SLOGO<SYSNO>
    rslg/max_diskspace/local 1000000
    rslg/central/file /usr/sap/<SID>/SYS/global/SLOGJ
    rslg/central/old_file /usr/sap/<SID>/SYS/global/SLOGJO
    rslg/max_diskspace/central
    Refer to http://help.sap.com/saphelp_nw70/helpdata/EN/c7/69bcbaf36611d3a6510000e835363f/content.htm
    for explanation of profile parameters.you can reduce the size of system log using rslg/max_diskspace_local and rslg/max_diskspace_central
    But you can't reduce the size of job log files on OS
    Rohit

  • How can i password protect some files and web sites?

    How can I possword protect some files and web sites on my mac air so others using my laptop can't access them?

    Set a password for your user; create other user accounts for when other people want to use it. You can create a "guest" login which gets wiped after every logout, if that's more appropriate for them.
    Matt

  • How can i create a pdf file from Indesing, whit out loosing resolution...

    How can i create a pdf file from Indesing, whit out loosing resolution...
    in linked images (bitmap) idon´t know where or how can i keep the same resolution "image" that is from the original file ......

    In the export settings there is a panel called Compression. You can set downsampling and compression, or lack thereof, there.

Maybe you are looking for

  • How do i install lightroom 5 on my macbook pro?

    ho do i install lightroom 5 on my macbookpro student version?

  • How to avoid save as?

    I already saw others asking this, but nobody could provide an answer. Ever since I updated to reader DC, I always get a promt to save as instead of just save after highlighting or commenting a file. I need the save feature to overwrite my excising fi

  • MM Pricing Procedure as required below

    Dear experts, Kindly suggest me how to map the taxes as mentioned below 1 BASIC 700 2 SIZING CHARGES 79 Fixed Charges 3 FIXED ROYALTY@14% 98 Applicable on S.No.1 4 Surface Transportation Charges 232 Fixed Charges 5 CLEAN ENERGY CESS 50 Fixed Charges

  • First webService -- "VERSION" doesn't work... (Tomcat and Axis2)

    Hi, I installed Tomcat 5.5 (Checked it and it works). Installed axis2.war (put it in the right directory "webapps" and it works). So I tried to see the webservice that comes with the axis2 war file, it's name is version and the management web interfa

  • Necessary to have internet to execute Web Reports?

    Hi, I'm new to WAD -at learning stage Is it necessay to have web / Internet  connection to view or execute Web reports? 'Coz On executing webreport i'm getting error :"Operation Could  not be performed due  to portal comunication  error" Thanq