Problem to read and write files on hdd out of html with an Applet ????

hi there,
i wrote an applet for loading a file from HDD or saving data out of a cookie in a file on a hdd.
when i compile the class there are warnings about "unchecked method invocation" and "unchecked conversion".
what did i do wrong?
i think it's about this function:
AccessController.doPrivileged(new PrivilegedAction()
public Object run()
if(saveCartAtOnce.toLowerCase().compareTo("true")== 0)
SaveShoppingCart();
}//if
return null;
}// public Object run
});//AccessController
could anyone help me?
i could also send the whole class then....
thanks a lot.
greetings
Volker Becht
[email protected]

OK
now i will post the whole class.
my questen is: what have i to do so that anything runs?
if anyone will need a file example which should be read
into the calss i will email it.
package de.CATALOGcreator.shoppingcart;
import java.awt.*;
import java.io.*;
import java.applet.*;
import java.util.*;
import java.security.*;
import netscape.javascript.*;
public class shoppingcart extends java.applet.Applet
     private static final long serialVersionUID = 1234567890L;
   //Explanation of the possible Parameters of the applet, all of the following
    //parameters need not be given explicitely, because they have default values.
    String errorMessageInvalidFileFormat = "";  //set the ErrorMessage String for InvalidFileFormat when loading
    String openDialogTitle = "";                //set the Open Dialog Title
    String saveDialogTitle = "";                //set the Save Dialog Title
    String articleNumberString = "";            //set the ArticleNumber of the CSV headline
    String articleNameString = "";              //set the ArticleName of the CSV headline
    String amountString = "";                   //set the AmountName of the CSV headline
    String priceString = "";                    //set the PriceName of the CSV headline
    String delimiterString ="";                 //set the Delimiter for the Output-csv
    String inputdelimiterString ="";            //set the Delimiter for the Intput-csv
    //No parameter, this String is built from articleNumberString, articleNameString, amountString and
    //priceString and delimiterString in the following manner:
    //headline = articleNumberString + delimiterString + articleNameString + delimiterString + amountString+ delimiterString  + priceString;
    //see: init();
    String headline = "";                       //set the Headline of the csv-file
    //Another parameter is saveCartAtOnce, which says, if the save-Dialog is schown
    //at once when the applet is initialized. If the value is "true", the dialog shows
    //at once, in all other cases (also if parameter does not exist) you have to
    //call SaveShoppingCart explicitely.
    String saveCartAtOnce;
   public void init()
        try
               //set the default setting for the Paramters
               openDialogTitle = this.getParam("openDialogTitle", "Open Shopping Cart");
               saveDialogTitle = this.getParam("saveDialogTitle", "Save File As");
               errorMessageInvalidFileFormat = this.getParam("errorMessageInvalidFileFormat", "Invalid File Format!\nLoading stopped.");
               delimiterString = this.getParam("delimiterString", "||");
               inputdelimiterString= this.getParam("inputdelimiterString", ",");
               articleNumberString = this.getParam("articleNumberString", "Article Number");
               articleNameString = this.getParam("articleNameString", "Article");
               amountString = this.getParam("amountString", "Amount");
               priceString = this.getParam("priceString", "Price");
               headline = articleNumberString + delimiterString + articleNameString + delimiterString + amountString + delimiterString  + priceString;
               saveCartAtOnce = this.getParameter("saveCartAtOnce");
               AccessController.doPrivileged(new PrivilegedAction()
                              public Object run()
                                   if(saveCartAtOnce.toLowerCase().compareTo("true")== 0)
                                        SaveShoppingCart();
                                        //LoadShoppingCart();
                                   }//if
                                   return null;
                              }// public Object run
               });//AccessController
          catch(Exception e)
               e.printStackTrace();
    }//void init
    public void  SaveShoppingCart()
        DataOutputStream dos;
        String myFile;
        File f ;
         myFile =  SaveDialog();
           if(myFile!=null)
                f = new File(myFile);
               String Artikel=getParameter("Artikel");
               String Anzahl=getParameter("MyAnzahl");
               String Bezeichnung=getParameter("Bezeichnung");
               String Preis=getParameter("Preis");
               StringTokenizer stArticle = new StringTokenizer(Artikel, inputdelimiterString);
               StringTokenizer stAnzahl = new StringTokenizer(Anzahl, inputdelimiterString);
               StringTokenizer stBezeichnung = new StringTokenizer(Bezeichnung, inputdelimiterString);
               StringTokenizer stPreis = new StringTokenizer(Preis, inputdelimiterString);
               JSObject.getWindow(this).eval("alert('"+ Artikel +"')");
                 try
                      dos = new DataOutputStream(new BufferedOutputStream(new FileOutputStream(myFile),128));
                      // Line 1
                    dos.writeChars(headline + "\n");
                      while (stArticle.hasMoreTokens())
                          String tmpArticle=stArticle.nextToken();
                          String tmpAnzahl=stAnzahl.nextToken();
                          String tmpBezeichnung=stBezeichnung.nextToken();
                          String tmpPreis=stPreis.nextToken();
                          dos.writeChars(tmpArticle + delimiterString + tmpBezeichnung + delimiterString +tmpPreis +  delimiterString + tmpAnzahl + "\n");
                    }//while
                      dos.flush();
                      System.out.println("Successfully wrote to the file named " + myFile + " -- go take a look at it!");
                      dos.close();
               }//try
                  catch (SecurityException e)
                    System.out.println("JavaSoft SaveShoppingCart: SecurityException\nMessage:" + e.getMessage() + "\nStackTrace:");
                    e.printStackTrace(System.out);
               }//catch
               catch (IOException ioe)
                    System.out.println("JavaSoft SaveShoppingCart: IOexception\nMessage:" + ioe.getMessage() + "\nStackTrace:");
                    ioe.printStackTrace(System.out);
               }//catch
          }//if
    }//void  SaveShoppingCart
    private String SaveDialog()
        try
           //Date now = new Date(System.currentTimeMillis());
            Calendar rightNow = Calendar.getInstance();
           //SystemDate
            //String strDay = Integer.toString(now.getDate());
            String strDay = Integer.toString(rightNow.get(Calendar.DAY_OF_MONTH));
            //String strMonth = Integer.toString(now.getMonth()+1);
            String strMonth = Integer.toString(rightNow.get(Calendar.MONTH));
            //String strYear = Integer.toString(now.getYear()+1900);
            String strYear = Integer.toString(rightNow.get(Calendar.YEAR));
            //SystemTime
            //String strHoure = Integer.toString(now.getHours());
            String strHoure = Integer.toString(rightNow.get(Calendar.HOUR));
            //String strMinutes = Integer.toString(now.getMinutes());
            String strMinutes = Integer.toString(rightNow.get(Calendar.MINUTE));
            //String strSeconds = Integer.toString(now.getSeconds());
            String strSeconds = Integer.toString(rightNow.get(Calendar.SECOND));
            //set SystemDate+SystemTime
            String strDate=strDay+"_"+strMonth+"_"+strYear+"_"+strHoure+"_"+strMinutes+"_"+strSeconds;
            //set SaveName as *.csv
            String SaveAs = strDate + ".csv";
            FileDialog fd = new FileDialog (new Frame(), "Save File As", FileDialog.SAVE);
            fd.setFile(SaveAs);
            fd.setVisible(true);
            //Value Save or Cancel Button
            if((fd.getDirectory() == null) || (fd.getFile() == null)) // user pressed the cancel - button
                return null;
            }//if
            else // user pressed save - button
                return fd.getDirectory() + fd.getFile();
            }//else
        }//try
        catch (SecurityException e)
               System.out.println("JavaSoft String SaveDialog: SecurityException\nMessage:" + e.getMessage() + "\nStackTrace:");
               e.printStackTrace(System.out);
              return null;
        }//catch
    }// String SaveDialog
    public String OpenDialog()
           FileDialog fd = new FileDialog (new Frame(), openDialogTitle, FileDialog.LOAD);
           fd.setVisible(true);
           return fd.getDirectory() + fd.getFile();
    }//String OpenDialog
    private String getParam( String paramName, String defaultValue )
          String value = getParameter( paramName );
          if ( value != null )
               return value;
          }//if
          return defaultValue;
    }//String getParam
    public void LoadShoppingCart()
        String myFile;
        File f ;
        myFile =  OpenDialog();
        if(myFile!=null)
               f = new File(myFile);
               String rl = "";
               Object[] Obj = new Object[2];
               try
                    DataInputStream dis = new DataInputStream(new BufferedInputStream(new FileInputStream(myFile),128));
                    // Line 1
                    String FirstLine = myReadLine(dis);
                    JSObject.getWindow(this).eval("alert('"+ FirstLine +"')");
                    if(FirstLine.startsWith(headline))
                         while ( (rl = myReadLine(dis)) != null)
                              //examines correct delimiter
                              StringTokenizer token = new StringTokenizer (rl, delimiterString);
                              if(token.countTokens()!= 4)
                                   dis.close();
                                   JSObject.getWindow(this).eval("alert('"+ errorMessageInvalidFileFormat +"')");
                              }//if
                            Obj[0]= (Object)rl;
                            Obj[1]= (Object)delimiterString;
                            JSObject.getWindow(this).call("addCSVArticle",Obj); // this=applet
                         }//while
                         JSObject.getWindow(this).call("importFinished",null);
                    else
                         dis.close();
                         JSObject.getWindow(this).eval("alert('"+ errorMessageInvalidFileFormat +"')");
                         //System.exit(-1);
                    }//else
                    dis.close();
               }//try
                  catch (SecurityException e)
                    System.out.println("JavaSoft LoadShoppingCart: SecurityException\nMessage:" + e.getMessage() + "\nStackTrace:");
                    e.printStackTrace(System.out);
               }//catch
               catch (IOException ioe)
                    System.out.println("JavaSoft LoadShoppingCart: IOexception\nMessage:" + ioe.getMessage() + "\nStackTrace:");
                    ioe.printStackTrace(System.out);
               }//catch
               catch(Exception exc)
                    System.out.println("JavaSoft LoadShoppingCart: Exception\nMessage:" + exc.getMessage() + "\nStackTrace:");
                    exc.printStackTrace(System.out);
               }//catch
          }//if
    }//void LoadShoppingCart
    private String myReadLine(DataInputStream dis)
        char tmp;
        String line = "";
        try
            while((tmp = dis.readChar())!= '\n')
                line += tmp;
            return line;
        }//try
        catch(IOException ioexc)
            return null;
        }//catch
    }//String myReadLine
    public boolean isInitialized()
          return true;
}//public class ShoppingCart extends java.applet.Applet[/i]

Similar Messages

  • What do I need to do to be able to read and write files to a Seagate Backup Plus Slim Portable Drive on BOTH a Mac and a PC? I downloaded "Paragon NTFS for Mac" onto my Mac, so now I can write to the drive, but when I plug it into a PC it won't work.

    What do I need to do to be able to read and write files to a Seagate Backup Plus Slim Portable Drive on BOTH a Mac and a PC? I downloaded "Paragon NTFS for Mac" onto my Mac, so now I can write to the drive, but when I plug it into a PC it won't work.

    If the HDD is formatted NTFS, then it suggests that there is a problem with the PC.  Check with the manufacturer.
    Ciao.

  • How to burn read and write files on DVD

    I would like to know how to burn DVDs (image files) with the Read and Write setting. I have changed the settings in Get Info for the image files to Read and Write for Owner, Group and Others and yet when I burn the DVD and try and copy the files back onto the hard drive (to test if it works or not) it won't allow me. When I check the Get Info it says Read and Write for owner (greyed out) and Read Only for Group and Others (greyed out too).
    I have also tried to change the status of the blank DVD before adding files and after adding the files (but b4 the burn) to Read and Write, this works but then during the burn process the DVD or burner changes my settings to Read Only.
    I am burning with Finder and have tried with Toast 10 Titanium. What am I doing wrong, or not doing at all?! I'm going loopy with frustration!

    Kiraly, I agree that the actual problem here might be something else, but as a side issue there seems to be a difference in the way permissions are handled when a file copy is made using Finder compared to when the copy is made using the cp copy in Terminal. At least in my Tiger system, Finder preserved the permission structure, though not the ownership, when it copied a file, whereas cp used the OS defaults.
    I tried the following experiment:
    From my test user account "t", I created a textfile named ReadWrite.txt, and gave it Read+Write permissions for Owner, Group, and Others. I then burned it using Finder to a DVD which I named PermissionTest, and then unchecked the "Ignore Ownership" box on PermissionTest.
    The original ownership and permissions were preserved on the DVD, though of course you couldn't actually write to anything there:
    xxG5-Computer:~ t$ ls -l /Volumes/PermissionTest/ReadWrite.txt
    -rw-rw-rw- 1 t t 15 Sep 13 18:25 /Volumes/PermissionTest/ReadWrite.txt
    I then copied the file from the DVD to the Desktop using Finder, and the permissions were preserved!
    Finder copy:
    xxG5-Computer:~ t$ ls -l /Users/t/Desktop/ReadWrite.txt
    -rw-rw-rw- 1 t t 15 Sep 13 18:25 /Users/t/Desktop/ReadWrite.txt
    I then trashed the Finder copy of ReadWrite,txt on the desktop, and made a second copy from the DVD, but this time I used the cp command from Terminal instead of using Finder. This time the permissions were not preserved, but reverted to the OS default:
    cp copy:
    xxG5-Computer:~ t$ cp /Volumes/PermissionTest/ReadWrite.txt Desktop
    xxG5-Computer:~ t$ ls -l /Users/t/Desktop/ReadWrite.txt
    -rw-r--r-- 1 t t 15 Sep 13 19:43 /Users/t/Desktop/ReadWrite.txt
    I then switched to a different user account "t1", and repeated the above with the same DVD, first copying the ReadWrite.txt file to the desktop using Finder, and then using cp. The ownership of the copied file changed from t to t1 in both cases, but the permission structure again was preserved in the Finder copy but not in the cp copy:
    DVD file:
    xxG5-Computer:~ t1$ ls -l /Volumes/PermissionTest/ReadWrite.txt
    -rw-rw-rw- 1 t t 15 Sep 13 18:25 /Volumes/PermissionTest/ReadWrite.txt
    Finder copy:
    xxG5-Computer:~ t1$ ls -l /Users/t1/Desktop/ReadWrite.txt
    -rw-rw-rw- 1 t1 t1 15 Sep 13 18:25 /Users/t1/Desktop/ReadWrite.txt
    cp copy:
    xxG5-Computer:~ t1$ cp /Volumes/PermissionTest/ReadWrite.txt Desktop
    xxG5-Computer:~ t1$ ls -l /Users/t1/Desktop/ReadWrite.txt
    -rw-r--r-- 1 t1 t1 15 Sep 13 19:51 /Users/t1/Desktop/ReadWrite.txt
    I got similar results when I tried copying a file with Read+Write permissions for all from a USB flash drive to the Desktop, again with the "Ignore Ownership" box unchecked.

  • Read and write files

    i am using IE as brower,. how do i change the properties so that i can let an applet to read and write files on my system? thank you, for help.

    DON'T POST MULTIPLE TIMES!
    Proper English:
    I am using Internet Explorer as my web browser. How do I change the properties so that an applet can read and write files to my local system? Thanks for any help.
    Answer) Search on Java and security in the forum search or google. This topic is covered numerous times.
    DeltaCoder

  • How read and write file

    Hi
    please help me
    How to read and write data from file in j2me

    hello, u are looking to write some persistant data to a file on the mobile phone? Its the next step for me aswell. You can use the recordset function.
    I'm looking at this site: http://www-128.ibm.com/developerworks/library/wi-rms/
    It seems every time you use the function you must use try catch blocks. I hope this is what you are looking for.

  • Read and Write Files to user from Forms Server

    We are developing an application that requires us to rread and write files to the user system. We are deploying using the developer/forms server and this is not happenning. The text_io package and the d2wkutil operate on the application server system, not the user system. So is there a method to read the file contents into the app and write files out to the user system across the web. Thanks.

    developer6 can interact with javabeans. the javabean runs as an applet on the client machine. all you have to do is setup a javabean that read and write to your client machine.
    when you test your application, work with java console open so you'll be able to debug your appliacion, if you'll receive java security execption you may need to sign this javabean. look at sun site for info regarding the usage of javakey for signing java classes and jars.

  • Multithreaded problem in read and write thread

    This is a producer consumer problem in a multi-threaded environment.
    Assume that i have multiple consumer (Multiple read threads) and a
    single producer(write thread).
    I have a common data structure (say an int variable), being read and written into.
    The write to the data sturcture happens occasionally (say at every 2 secs) but read happens contineously.
    Since the read operation is contineous and done by multiple threads, making the read method synchronized will add
    overhead(i.e read operation by one thread should not block the other read threads). But when ever write happens by
    the write thread, that time the read operations should not be allowed.
    Any ideas how to achive this ??

    If all you're doing is reading an int, then just use regular Java synchronization. You'll actually get a performance hit if you're doing simple read operations, as stated in the ReadWriteLock documentation:
    Whether or not a read-write lock will improve performance over the use of a mutual exclusion lock depends on the frequency that the data is read compared to being modified, the duration of the read and write operations, and the contention for the data - that is, the number of threads that will try to read or write the data at the same time. For example, a collection that is initially populated with data and thereafter infrequently modified, while being frequently searched (such as a directory of some kind) is an ideal candidate for the use of a read-write lock. However, if updates become frequent then the data spends most of its time being exclusively locked and there is little, if any increase in concurrency. Further, if the read operations are too short the overhead of the read-write lock implementation (which is inherently more complex than a mutual exclusion lock) can dominate the execution cost, particularly as many read-write lock implementations still serialize all threads through a small section of code. Ultimately, only profiling and measurement will establish whether the use of a read-write lock is suitable for your application.

  • Read and write file problem

    hello
    I have web application and I try using servlet to upload an image
    upload proccess works fine
    example
    1. I upload the the file C:\images\books\mybook.gif into
    temp folder
    2. other actions
    3. I want to write the fole mybook.gif into othet folder
    this process oerks fine on my home pc
    but I becom an ecxeption by webprovider
    /home/mydomain/public_html/projects/tempData/C:\images\books\mybook.gif(No such file or directory)what shoud be the problem and how to solve this issue
    thanks

    here is the code of the uploadservlet
    public void doPost(HttpServletRequest request, HttpServletResponse response)
                   throws ServletException, IOException
        PrintWriter out = null;
        String tempUploadDir = request.getSession().getServletContext().getRealPath("/")+"MyTemp"+File.separator;
         try
              out = response.getWriter();
             response.setContentType("text/html");
             MultipartRequest parser = new ServletMultipartRequest(request,
                                                                               MultipartRequest.MAX_READ_BYTES,
                                                                               MultipartRequest.IGNORE_FILES_IF_MAX_BYES_EXCEEDED,
                                                                               null);
                 Enumeration files= parser.getFileParameterNames();
                      while(files.hasMoreElements()){
                                boolean sizeOK    = true;         
                                String name       = (String)files.nextElement();
                                String filename   = parser. getBaseFilename(name);
                              InputStream ins   = parser.getFileContents(name);
                              if((parser.getFileSize(name) / 1024) > AppConstants.MAX_READ_BYTES){sizeOK = false;}
                         if(sizeOK){
                              if (ins!=null)
                                      BufferedInputStream input = new BufferedInputStream(ins);
                                   FileOutputStream outfile = new FileOutputStream(new File("MyTemp",filename));
                                             int read;
                                             byte[] buffer = new byte[4096];
                                             while ((read=input.read(buffer))!=-1){
                                                        outfile.write(buffer, 0, read);
                                             outfile.close();
                                             input.close();
             }// end out while
         }catch (Exception e) {  out.flush(); }
    what is to change here thanks

  • How do I read and write files on a mac?

    On my windows it's easy, but when I try to write files and read them
    on a Mac the filepath is always wrong. I want to write to my
    "Documents" folder, and when I do /Documents/Hello.txt as a filepath
    it gets it wrong. I don't know why it won't work because I'm not too familiar
    with macs yet. Any help with the filepath problem?

    Your Documents folder is not /Documents. It's /Users/your_user_name/Documents

  • How to read and write files using flex?

    Using flex, we would like to make some utility that will do a
    lot of reading and writing from local files.
    The writing is what I am more worried about. How is this
    possible?
    I want to make .zip files containing many xml files, and some
    assorted media files such as .swf jpeg, html, etc.
    I am new to flex btw, I've never used it properly before, and
    this is the main concern I have with flex, which is that it doesn't
    let me write and read lots of files.
    Mainly we are looking for a good cross platform solution that
    will let us develop an app, and flex looks professional and it is
    cross platform. The "internet app" side of things, isn't so much
    what we need really.
    Would wxWidgets be better suited to our needs?

    The Flash player sand box will not allow reading and writing
    local files. If you want to use Flex to create a desktop you will
    need the Apollo runtime. The alpha is available at Adobe
    Labs.

  • Problem During reading and write local file

    Hi ,
    I had written a small applet program, it have function �readNwriteFile()� it read/write the local file
    This function works fine when I call it from start () function.
    But whenever I was trying to call this function from java script it gave me this exception.
    �java.security.AccessControlException: access denied (java.io.FilePermission C:\temp_jar\DSC01692.JPG read)�.
    Java script is working fine, I can access any another function from script The problem is some related to access
    I had set the permission in my policy file .this the permission that I had set.
    grant codebase "file:c:\temp_jar"{
    permission java.io.FilePermission "<< ALLFILES >> , "read ,write ,delete ,execute ";
    Java code.
    package com.ravindra;
    import javax.swing.*;
    import java.awt.*;
    import java.io.*;
    import java.util.*;
    public class MialTest extends JApplet{
         public void init() {
         public void start(){
              readNwriteFile(); /// When I call this function from here It is working
         public byte [] readNwriteFile(){
              try {
                   File localfile = null;
                   localfile = new File("C:\\temp_jar\\DSC01692.JPG");
                   FileInputStream fs = new FileInputStream(localfile);
                   ByteArrayOutputStream bs = new ByteArrayOutputStream() ;
                   int actual_data = (int)fs.read();
                   while(actual_data > -1){
                        bs.write(actual_data);
                        actual_data = (int)fs.read();
                   byte [] final_data = bs.toByteArray();
                   File out_file = new File("C:\\temp_jar\\Ravindra_test.JPG");
                   FileOutputStream out_stream = new FileOutputStream(out_file);
                   out_stream.write(final_data);
                   out_stream.flush();
                   fs.close();
                   bs.close();
                   localfile = null;fs = null; bs = null;
                   return final_data;
              } catch (Exception e) {
                   // TODO Auto-generated catch block
                   e.printStackTrace();
                   return null;
    Java Script Code:

    Hi ,
    I had written a small applet program, it have function �readNwriteFile()� it read/write the local file
    This function works fine when I call it from start () function.
    But whenever I was trying to call this function from java script it gave me this exception.
    �java.security.AccessControlException: access denied (java.io.FilePermission C:\temp_jar\DSC01692.JPG read)�.
    Java script is working fine, I can access any another function from script The problem is some related to access
    I had set the permission in my policy file .this the permission that I had set.
    grant codebase "file:c:\temp_jar"{
    permission java.io.FilePermission "<< ALLFILES >> , "read ,write ,delete ,execute ";
    Java code.
    package com.ravindra;
    import javax.swing.*;
    import java.awt.*;
    import java.io.*;
    import java.util.*;
    public class MialTest extends JApplet{
         public void init() {
         public void start(){
              readNwriteFile(); /// When I call this function from here It is working
         public byte [] readNwriteFile(){
              try {
                   File localfile = null;
                   localfile = new File("C:\\temp_jar\\DSC01692.JPG");
                   FileInputStream fs = new FileInputStream(localfile);
                   ByteArrayOutputStream bs = new ByteArrayOutputStream() ;
                   int actual_data = (int)fs.read();
                   while(actual_data > -1){
                        bs.write(actual_data);
                        actual_data = (int)fs.read();
                   byte [] final_data = bs.toByteArray();
                   File out_file = new File("C:\\temp_jar\\Ravindra_test.JPG");
                   FileOutputStream out_stream = new FileOutputStream(out_file);
                   out_stream.write(final_data);
                   out_stream.flush();
                   fs.close();
                   bs.close();
                   localfile = null;fs = null; bs = null;
                   return final_data;
              } catch (Exception e) {
                   // TODO Auto-generated catch block
                   e.printStackTrace();
                   return null;
    Java Script Code:

  • Help to read and write file

    Hallow I build a program that I need to read file (from transaction file)to internal table(with function CALL FUNCTION 'FILE_GET_NAME' ) but I dot now to read
    The file to itab and after to write it to libary
    reagrds

    Hi..try this..
    <b>Example</b>
       logical file name:             MONTHLY_SALES_FILE
       physical file name:            VALUES<PARAM_1>
       logical path:                  SALES_DATA_PATH
         physical path (UNIX):        /usr/<SYSID>/<FILENAME>
         physical path (Windows):     C:\SALES\<FILENAME>
       o   Example 1
           Get file name for UNIX platform
           (current system: K11)
         <b>CALL FUNCTION 'FILE_GET_NAME'</b>
           EXPORTING
           LOGICAL_FILENAME  = 'MONTHLY_SALES_FILE'
                    IMPORTING
                       FILE_NAME = FILE
                       FILE_FORMAT = FORMAT.
          <b> Result:
               FILE = /usr/K11/VALUES
               FORMAT = WK1[/b<b>]**********************************
    Example 2</b>
    Get file name for UNIX platform, passing a parameter
    (current system: K11)
          <b> CALL FUNCTION 'FILE_GET_NAME'</b>          EXPORTING
                 LOGICAL_FILENAME = 'MONTHLY_SALES_FILE'
                 PARAMETER_1 = '_TST'
              IMPORTING
                 FILE_NAME = FILE
                 FILE_FORMAT = FORMAT.
    <b>Result:</b>     FILE = /usr/K11/VALUES_TST
         FORMAT = WK1
    Now use..
      GUI_UPLOAD..
    <b>CALL FUNCTION 'GUI_UPLOAD'</b>  EXPORTING
        filename               = 'Filepath' " from above
    IMPORTING
      FILELENGTH                    =
      HEADER                        =
      tables
        data_tab                      = itab
    use..GUI_DOWNLoad
    <b>CALL FUNCTION 'GUI_DOWNLOAD'</b>
      EXPORTING
      BIN_FILESIZE                    =
        filename                        = 'Library path'
    tables
        data_tab                        = ITAB
    Message was edited by:
            Rammohan Nagam

  • I need a central hard drive for both MAC and PC to read and write files interactively. Would the time capsule work?

    I've just purchased a new mac and realised that I can not write directly to my external harddrive that I use with my PC.
    I need a drive that both my Mac and PC can work with. Could someone tell me what the best solution for this is??
    Many thanks in advance.
    Stuart

    Install a tool such as the NTFS-3G drivers on the Mac.
    (60694)

  • Read and Write file in Remote system Drive

    Hi all,
    I am try to create the file in Remote system,
    in example i find the method to create file in remote system , ie //computer_name/Share_name/fileName
    the above sample , i know the computer name but i dont know Share name of the computer ,
    Its any possible to find the share name in java ?
    please give some idea to solve my problem ?
    With Regards,
    Ganesh Kumar.L

    tlgkumar wrote:
    in example i find the method to create file in remote system , ie //computer_name/Share_name/fileName
    the above sample , i know the computer name but i dont know Share name of the computer ,
    Its any possible to find the share name in java ?Sure. Ask the person who is writing the requirements which share you should use. Don't settle for incomplete requirements.

  • Read and Write files in Windows Vista

    Im trying to make an AIR application that reads a file from
    the users document directory and then try to save it again when
    user have made the changes. It works fine on my mac, but when i try
    it on windows vista im getting the error code #3003 "File or
    directory doesnt exist", but it really DO exist. What am i doing
    wrong.. is there some security issues that i have missed? i have
    tryed with applicationStorageDirectory aswell and
    applicationDirectory, but nothing works. Very greatful for some
    advice on what im doing wrong.
    /Andreas
    _sellerFile = File.documentsDirectory ;
    _sellerFile =
    _sellerFile.resolvePath("faktura/data/seller.xml");
    var stream = new FileStream();
    try
    stream.open(_sellerFile , FileMode.READ);
    var xml = XML(stream.readUTFBytes(stream.bytesAvailable));
    stream.close();
    seller = XMLParser.parseSeller(xml, this);
    displaySeller();
    catch(e:Error)
    errorMessage("Varning!", e.getStackTrace() + ", url: " +
    _sellerFile.url + ", path: " + _sellerFile.nativePath, "show");

    Are you seeing any issues when you open the file in a text
    editor? May be it is worth to take a look at permissions for the
    file for your vista user and the ownership of the file (properties
    -> Security). According to the documentation FileStream.open
    will throw error if there is no read permission on the file. Hope
    it's a physical file and not a link to any virtual store location.
    In the worst case, rename the existing file, manually create a text
    file and copy contents from original file to the new one and try.
    Good luck :)

Maybe you are looking for

  • GL - Balances do not match with sum of Items

    Hi, I have a requirement in which I am pulling opening, closing balance and a list of all transactions (or items ) on a daily basis from GL to a flat file, and then loading in a third-party tool . Now, the issue is sum of all items (gl_je_lines ) sho

  • VC on EP

    Hi all, Which version of Visual Composer is available for NW2004 EP 6.0 sp16 installation? Do i need Win2003 + IIS + MSSQL to run VC ? Or is there any patch or plugin using which i can attach VC to my EP Server itself? And, finally , the version of V

  • Can I scan a document to Microsoft WORD using the HP-4630 printer?

    When scanning a document/photo/etc. using the HP 4630 printer, there's not an option to scan it to Microsoft WORD. Is that possible? If so, please tell me how. Thanks!!

  • JDEV 10.1.3.3 ADF Table Row Highlighting onMouseOver

    I am working with JDEV 10.1.3.3 and I have the following requirement for an ADF table. When a user's mouse hovers over a table row, the table row should be highlighted and a title should pop up displaying the value of a hidden column in the table. In

  • [Solved] Default NIC Module?

    I'm trying to troubleshoot an issue I'm having with Steam downloads, and I'm thinking it may be my NIC drivers. I have a Intel Gigabit CT, with the latest 3.1.0.2 drivers. I was wondering what drivers or modules Arch was using before I installed the