How to create the file on a location where user having rights?

Hi,
I have requirement, in my application a lot program thatcreating a report in a file and it is written into a user location. Now it specified directly like ( c:\ or d:\......).
The problem is that the user doesn't have rights to access that directories. What i suggest or feel i want to create that particular reports on a location where the end user having rights.
Basically in Windows system %userprofiles% having right to do anyting. Suppose the OS installed in C: the %userprofiles% c:\documents and settings\username or D: then D:\Document and settings\username.
How to achieve this please help me.
Good help will be appreciated.
kanish

Hello,
The best practice would be to create the file in My Documents for the current connected user to the windows.
Unfortunately, you did not mention your forms version. In older version like 6.x there is function in d2kwutil library called Read_Registry in win_api_environment section and in latest versions the same function availble in webutil library with client_ name.
So, you can read the registery for current connected user by using the above mentioned function from the following path of registry.
My Computer\HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Explorer\Shell Folders
There is an entry called Personal. Read the path from that entry at runtime while generating/saving file to the client's location and save the file into that path.
-Ammad

Similar Messages

  • How to create the file   .jar in  openScript .

    How to create the file .jar in openScript .
    thanks

    Ahh ok.
    What I usually do is create a script called My Functions then I add new functions by right clicking in OpenScript's tree view
    Add-> Other -> General -> New Function.
    Once you have created the functions you can either place the script on a shared repository or export it manually an then share it File -> export
    Then from the script that you want to call the functions go to:
    Script -> Script Properties -> Script Assets -> Script -> Add then select the My Functions script once that is done you can call the methods from the script by:
    Add -> Script Functions -> Script My Functions then select the function you wish to use.
    Hope this helps
    Alex

  • How to download the files, that are located in server, from the client?

    Hello folks,
    My program is like that, the files are located in the server and stored in file system.
    I can only know the server name and the directory listing, so that I can show the file names from that directory on the browser.
    The user might downloads those files from the browser and he might deletes those files through the browser.
    That user has valid right to do so and the files can be any type of extension.
    So how can I write this kind of program? Currently the whole system is in struts, so how can I make compatible with struts technology?
    Do u have any ideas?
    Regards,
    Phyo

    Thank you, grigpm. But actually I want the user to select the file that he wants to download rather than setting it in the configuration file. If it is possible, let me see the sample code of FileManager servlet. I've tried with some ways but I can only download from the same server with the application server. I want to download from different server. I hope someone can help me with sample code....
    Best regards,
    Phyo

  • How to create a file in the server?

    Hi,
    I'm making a webservice that has to generate a XML file, sign it using another webservice and return this XML. The problem is that i don't know how to create the file in the server throught webservice.
    I use this code in the webservice to generate the XML and after I return the XML to client in a byte[]
         static void outputDocumentToFile(Document myDocument, String path) {
            //setup this like outputDocument
              try {
                   // XMLOutputter outputter = new XMLOutputter("  ", true);
                   XMLOutputter outputter = new XMLOutputter();
                   //output to a file
                   FileWriter writer = new FileWriter(path);
                   outputter.output(myDocument, writer);
                   writer.close();
              } catch(java.io.IOException e) {
                   e.printStackTrace();
        }But the file is generated in the client-side, how can I generate the file in the server-side?
    Thanks very much.

    Well the File object doesn't create a file it's simply an abstract representation of file and directory pathnames.
    You can try something like this:
    <%
    try
    // get the path to the web server root
    // I read somewhere not to use 'getRealPath' for some reason which I
    // can't seem to remember :S Hopefull someone can enlighten us :)
    String path = application.getRealPath("/project/jsp/demo.txt");
    File file = new File(path);
    PrintWriter writer = new PrintWriter(new BufferedWriter(new FileWriter(file)));
    writer.println("Hello World!");
    writer.close();
    catch (Exception e)
    System.err.println(e.getMessage());
    %>
    Hope this helps :)

  • How to create the logical file name

    Hi All,
        I have requirement where i need to post the Inventory Management data. for this i need to execute std. program RM07MMBL which is having logical file name in the selection screen. but i have placed my input file in application server.
       Can any one tell how to create the Logical filename which refers the physical path. I also tried <b>t-code SF01 & Table - FILENAMEC</b>I and found that we need to add an entry in this table but i really dont know how we have to do since this table cannot be maintained in SM30 also..
      Help Me.
      Thanks in Advance!...
    Regards,
    Ramkumar

    Hi Ram,
    Try using FILE transaction code...
    Follow these steps to create:::
    Double click on Logical file Path Definition
    Click on New Entries,
    Give Logical file Path name as Z_LOGICAL PATH and save it
    now choose this path and double click on Assignemt of Physical path to Logical path
    double click on the OS name
    Give some description and give some Physical path name from AL11 transaction and save it
    Now Double click on Logical File Name Definition,
    Click on New Entries,
    Give some logical file name: Z_LOGICAL_FILENAME
    Physical file: test
    Data Format: BIN
    Logical Path: Z_LOGICAL PATH
    Hope this helps
    Regards,
    Phani
    Message was edited by:
            Sivapuram Phani Kumar

  • I am working in windows 7 and I am trying to enable the copy/paste and I can not find user.j file in the profile and I am not real sure how to create a file, I can create a folder .

    I am trying to copy text from a word document and paste it into my web builder and it says that firefox does not support copy/paste from clipboard. Went to your site and it tells me to open the user.j file in my profile. This file does not exist and I am not real sure how to create that file so I can paste the fix from your site into it.

    I went to that link and added to firefox add on but it still does not work. I went to the add on option button for this but it told me that my MYSIWG widget was disabled. Does this have something to do with it not working and if so how do you enable it.

  • I have purchased Adobe XI Pro and created a form for entering bowling scores to submit to newspaper for my high school team.  I can not figure out how to get pdf's into my documents folder on my iPad so that I can access the files in bowling alleys where

    I have purchased Adobe XI Pro and created a form for entering bowling scores to submit to newspaper for my high school team.  I can not figure out how to get pdf's into my documents folder on my iPad so that I can access the files in bowling alleys where I do not have a Wi-Fi connections.  I need to be able access files without going to acrobat.com.  Help!!!@

    Post the PDF files to a web site. The browse to them in Safari on the iPad.  When you Open the files specify the Open to occur in Adobe Reader.  Then you can have/Save them in your Documents folder on the iPad.   An iPad has limited access to files otherwise.

  • How to create xml file from Oracle and sending the same xml file to an url

    How to create xml file from Oracle and sending the same xml file to an url

    SQL/XML (XMLElement, XMLForest, XMLAgg, etc) and UTL_HTTP.
    Whether that works for you with the version of Oracle you have, your requirements, and needs is another story. A little detail goes a long way.

  • My music files etc were all located on my old laptop which was stolen. I have just plugged my iphone in to my new computer and it has deleted all my files. Has anybody got any ideas on how to retrieve the files?

    My music files etc were all located on my old laptop which was stolen. I have just plugged my iphone in to my new computer and it has deleted all my files. Has anybody got any ideas on how to retrieve the files?

    WINDOWS?
    Connect the iPod to your PC. If iTunes starts syncing (ie erasing) your music automatically, hit the X in the upper right hand corner of iTunes display, to the left of the search box, to stop it.
    In Control Panel, Portable Media Devices, double-click your iPod.
    In the Tools menu -> Options, in the View Tab, check "Show hidden files and folders."
    Navigate to the Music folder. On my 'pod, the full path is
    Portable Media Devices\NAME of IPOD (F:)\iPod_Control\Music
    Select all the music folders, and drag and drop them into a folder on your hard drive, or directly into iTunes.
    And you're done! The iPod music folder structure is strange and inexplicable, but once you move your files into iTunes you can set it to automatically organize your folder by artist and album to clean that up. (To do this, in iTunes Edit menu, choose Preferences and in the Advanced tab, check "Keep iTunes Music Folder organized."
    might be out of date worth a try

  • How to create the SWF file which was included surrogate pairs.

    I would like to make sure how to create the SWF file which are included surrogate pairs.
    The error of outside the scope of unicode occurred when I compiled(mxmlc) the as file which was set surrogate pairs to 'Unicoderange'.
    Ex, I set the '  '(UTF-16 is '20B9F') to 'Unicoderange'.
    However, I cannot add the surrogate pairs.
    The error of outside the scope of Unicode occurred when I compiled the AS file.
    The reason of error was that the Unicode(UTF-16) of surrogate pairs is invalid.
    Then, I read the following pages.
    These pages are written that unicode-range supported surrogate pairs.
    http://livedocs.adobe.com/flex/3/html/help.html?content=fonts_07.html
    http://www.w3.org/TR/1998/REC-CSS2-19980512/fonts.html#descdef-unicode -range
    So please let me know how to create the SWF file which are included surrogate pairs.
    Environment
    - Flex3.5a
    - TTC: meiryo(ver6.02), msgothic(ver2.50), mspgothic(ver2.50)
    Thanks,
    Takeshi Ishihara.

    I've been able to create project jar files in Eclipse by selecting Export from the File menu, then choose Java - Jar file - and provide the required information, name, destination folder etc. But when I do this, I do not export other jars on the build path this way nor do I expect to do this. I am only concerned with creating a jar file of my own work. A jar file does not "contain" other jar files. If the jar file contains the main method, and requires other jars for it's execution, then you may wish to include a reference to required jars on the class path entry of the Manifest file of the jar file you create. I'm not sure how to create a Manifest file in eclipse though..

  • How to create the War file

    Can you help me , how to create the war file.
    I am using the tomcat 5.0 server, i have book folder in webapp.
    how i can create the war file? what is command?
    help me
    ramya

    using jar command u can create a war file
    jar -cmf myweb.war *.*<files to be included in war file>
    regd,
    ritu

  • How to create the log file in remote system using log4j.

    Hi,
    How to create the log file in remote system using log4j. please give me a sample code or related links.The below example i used for create the log file in remote system but it return the below exception.Is there any authandication parameter for accessing the remote path? Please help.
    public class Logging
    Logger log=null;
    FileAppender fileapp=null;
    public Logging(String classname)
    try
    log = Logger.getLogger(classname);
    String path=" [\\192.168.0.14\\c$\\LOG\\d9\\May_08_2008_log.txt|file://\\192.168.0.14\\c$\\LOG\\d9\\May_08_2008_log.txt]";
    fileapp = new FileAppender(new PatternLayout("%r [%t] %-5p %c %x - %m%n"),path, true);
    log.addAppender(fileapp);
    log.info("Logger initilized");
    }catch(Exception ex)
    ex.printStackTrace();
    java.io.FileNotFoundException: \\192.168.0.14\c$\LOG\d9\May_08_2008_log.txt (The network path was not found)
    at java.io.FileOutputStream.openAppend(Native Method)
    at java.io.FileOutputStream.<init>(Unknown Source)
    at java.io.FileOutputStream.<init>(Unknown Source)
    at org.apache.log4j.FileAppender.setFile(FileAppender.java:290)
    at org.apache.log4j.FileAppender.<init>(FileAppender.java:109)
    at annwyn.logger.BioCapLogger.<init>(Logging.java:23)
    at sun.applet.AppletPanel.run(Unknown Source)
    at java.lang.Thread.run(Unknown Source)
    Please help.
    Thanks in advance.
    Saravanan.K

    Sorry path is missing for the above request.
    path="\\192.168.0.14\c$\LOG\d9\May_08_2008_log.txt ";
    please help.
    Saravanan.K

  • How to create the exe file for java project.

    How to create the exe file for java project.
    am done the project in java swing , i like to create the project in exe format, so any one help for me,
    send the procedure for that.
    thanking u.

    How to create the exe file for java project.Have you ever heard of google? I pasted your exact "question" into a google search:
    http://www.google.com/search?q=How+to+create+the+exe+file+for+java+project.
    and got several useful links.
    Better search terms might yield even better results.
    Sheesh.

  • How to create SDA file for using AXIS Framework in the SOAP Adapter

    Hi experts,
    I have the following question:
    How I can create the SDA file aii_af_axisprovider.sda for using the AXIS Framework in the SOAP Adpater described in http://help.sap.com/saphelp_nw04/helpdata/en/45/a4f8bbdfdc0d36e10000000a114a6b/content.htm ?
    I have downloaded the files axis.jar, commons-discovery-0.2.jar, commons-logging-1.0.4.jar, commons-net-1.0.0-dev.jar and wsdl4j-1.5.1.jar. But how to create the SDA file aii_af_axisprovider.sda? Which tool I have to use for this? It is enough to compress these 5 jar-files in the sda file or need I further files with further information (meta information etc.)?
    Thanks and best regards
    Christopher

    Hi Christopher,
        Check this discussion if you have not checked already.
    Re: NTLM Authentication dosent work with XI ?
    Regards,
    Ravi

  • How to create a file when i run the report

    hi all
    i want to run the report and each time i run the same report to create a separate word file for the report o/p ?
    is there exist a procedure to create a fiel?

    hi magoo thanks for your consederation
    i use forms 10g
    But your answer is to create the file , but when i run the report next time the file overided by the new file ,
    But i want to generate a new file beside the old created file (how can i create separate file althouth the file name take the same name of the report)
    thanks.

Maybe you are looking for

  • Can't Print in C6280 all in one

    A few days ago I tried to print out a map and directions from mapquest. It's about 1.3 mb. It wouldn't print and I'm unable to delete it. The choices I'm given are pause, resume, cancel, restart and properties. I've tried them all to no avail. Now I

  • Email driver configuration error

    Hi I am trying to send Email notification through BPEL. I have cofigured my Email driver in enterprise manager But I am unable to send a email the error reported by UMS log says Overall Status     failed Status Code     DELIVERY_TO_GATEWAY_FAILURE St

  • 58L4300U Not responding

    I turned on my TV the other day and the Toshiba logo flashed and the screen immediately went black with the LED a solid green. The tv doesn't respond when you attempt to use the remote or the buttons on the side panel. I tried to "reset" the tv by un

  • Cheap 'Value RAM' not good ?

    I will be buying a new macbook before the end of the year. I'd like to max out the RAM with a 4 Gb kit. There's a reputable shop near where I live that sells all sorts of computer accessories for mac and pc, including RAM. There's the Kingston RAM co

  • Stuck Profile Again...

    My girlfriend tripped over my modem on Saturday and pulled the powerline out...This ONE ****ing disconection has resulted in a banded/stuck ip profile.... Download speedachieved during the test was - 1803 Kbps  For your connection, the acceptable ran