Opening a file or its location...

hi ....
we've created a software which converts word 2 xml....
here we browse the word file...select its destination...i.e where the user wants the xml file 2 be stored...after clicking the convert button the file gets converted....
NOW WE WANT THAT AFTER THE USER CLICKS THE CONVERT BUTTON THE FILE SHOULD BE CONVERTED AND A .....NEW WINDOW SHOULD OPEN WHICH SPECIFIES THE LOCATION OF THE FILE...
for eg....
if user selects the destination as....
C:\jdk1.3\bin
then that particular window should open which has the file in it....
CAN YOU GIVE ME THE CODE FOR THIS....

DO YOU MEAN YOU WANT... oh I'm sorry, I was shouting.
Do you mean you want to open a file browser window (like Explorer if you are on Windows) in the folder where your newly created xml file was just created, after converting?
If so, you will need to use one of the Runtime.exec methods (see documentation), and pass it a different command depending on your platform and file browser application of choice.
What have you got so far?

Similar Messages

  • Opening a file in its native application from Flex.

    Is it possible to open a file on whatever native application the user runs it as?  Or even, at that, to simply open the directory it's in, in an explorer window?
    We have a search application and the frontend is in Flex, and I'm trying to find a way to do this, such that when a use double clicks on a result (in a datagrid - but that's trivial), it opens the file or at least the location of the file on the OS.
    Any system call where I can say system("explorer.exe " + filepath); or something?
    Any help would be appreciated.

    Dear BillBlalock ,
    thank you for answer!! You are very kind and helpful!! I would like to inform everybody that I have finally find another way of soilving my problem and I announce it to the forum in case somebody else encounters the same problem. Well, I soved the nproblem by using the following code:
        excelButton.addActionListener(new ActionListener()
           public void actionPerformed(ActionEvent e)
             String filePath = "\""+saveFileName.toString()+"\"";
             System.out.println(""+filePath);
             try
               String cmd="explorer "+filePath;
               Process p = Runtime.getRuntime().exec(cmd);
             }catch(IOException ec){}
         });I hope it can be useful to somebody!! By this code, I can make a button (in my case the excelButton) to open any file in its default application. Keep up the great work you are doing guys!!

  • Problem with opening a file in its application using Runtime

    Dear experts,
    excuse me for my ignorance, but I am facing a problem and I would really
    appreciate some help. I am working on a java program in which I want the user
    to have the ability to save the contents of a JTable into a file of his preference (the file could be of any type i.e xls, txt, doc...) and then open this file in its
    default application (i.e the txt file through notepad, the xls file through excel etc..).
    Everything works fine with the code below, if the filePath does not contain blank spaces. I did some search on the forun and the web, and also tried to
    find a solution through the great link
    http://www.javaworld.com/javaworld/jw-12-2000/jw-1229-traps.html but I still
    cannot solve the problem. Below I quote the part of the code (actually the actionPerformed dunction of the equivallent button) which is responsible for the opening of the file.
        excelButton.addActionListener(new ActionListener()
           public void actionPerformed(ActionEvent e)
             //saveFileName is the File that I want to open
             String filePath = "\""+saveFileName.toString()+"\"";
             System.out.println(""+filePath);
             try
              String cmd="cmd.exe /C start "+filePath;
              String cmd="cmd.exe /C start C:\\Documents and Settings\\test.xls";
              Process p = Runtime.getRuntime().exec(cmd);
             }catch(IOException ec){}
         });Thank you in advance for your help!
    Sincerely yours,
    JIM

    Dear BillBlalock ,
    thank you for answer!! You are very kind and helpful!! I would like to inform everybody that I have finally find another way of soilving my problem and I announce it to the forum in case somebody else encounters the same problem. Well, I soved the nproblem by using the following code:
        excelButton.addActionListener(new ActionListener()
           public void actionPerformed(ActionEvent e)
             String filePath = "\""+saveFileName.toString()+"\"";
             System.out.println(""+filePath);
             try
               String cmd="explorer "+filePath;
               Process p = Runtime.getRuntime().exec(cmd);
             }catch(IOException ec){}
         });I hope it can be useful to somebody!! By this code, I can make a button (in my case the excelButton) to open any file in its default application. Keep up the great work you are doing guys!!

  • I can't open a file I just created a week ago and it says pages needs to be updated to open the file but its up to date

    I can't open a file I just created a week ago and it says pages needs to be updated to open the file but its up to date, what do I do?

    You have 2 versions of Pages on your Mac.
    Pages 5.2.2 is in your Applications folder.
    Pages '09/'08 is in your Applications/iWork folder.
    You are alternately opening the wrong versions.
    Pages '09/'08 can not open Pages 5 files and you will get the warning that you need a newer version.
    Pages 5.2 can open Pages '09 files but may damage/alter them. It can not open Pages '08 files at all.
    Older versions of Pages 5 can not open files from later versions of Pages 5.
    Once opened and saved in Pages 5 the Pages '09 files can not be opened in Pages '09.
    Anything that is saved to iCloud and opened in a newer version of Pages is also converted to Pages 5 files.
    All Pages files no matter what version and incompatibility have the same extension .pages.
    Pages 5 files are now only compatible with themselves on a very restricted set of hardware, software and Operating Systems and will not transfer correctly on any other server software than iCloud.
    Apple has removed over 110 features from Pages 5 and added many bugs:
    http://www.freeforum101.com/iworktipsntrick/viewforum.php?f=22&sid=3527487677f0c 6fa05b6297cd00f8eb9&mforum=iworktipsntrick
    You can add the icon of the missing Pages on your Dock or open Pages from the Apple menu > Recent Items list.
    Or you can archive Pages 5 so that it doesn't automatically open.
    If you are unhappy about this review/rate Pages 5 in the App Store.
    Peter

  • I downloaded acrobat reader dc. after download completed, I could not open many PDF files. Error read: "could not open this file because its either not a supported file or because the file has been damaged". I opened a new user account and moved these fil

    I recently downloaded acrobat reader dc. After download was complete, I could not open PDF files. Error read "Adobe acrobat reader DC could not open this file because its either not a supported file or the file has been damaged". Any suggestions?

    HI davidd92392148,
    Is this error occurring for all PDF files that you try to open? There is an issue where all file icons can change to the PDF icon after installation, so is it possible that the files you're trying to open have been affected by this issue (and aren't actually PDF files)? Please see Application, file icons change to Acrobat/Reader icon.
    If that document isn't the key, then please tell us more about these files. Where are they stored? Did they open in previous versions of Reader?
    Best,
    Sara

  • Open a file with its defualt associated application

    is there any way to open any file with its defualt associated application from a java program ?
    Example:
    In Windows I have a file example.txt and, from a java program, I would like opening it by the defualt associated application Notepad.
    Thx

    Take a look at this thread:
    http://forum.java.sun.com/thread.jsp?forum=31&thread=161228

  • Opening excel file n window location

    I have an application that tests three products at a time.  When a product is put on test, the user enters the serial number of the product, which pulls up the Excel datasheet for that product serial number.  The datasheet always comes up in the last saved location within the Excel window. I would like to control if this file appeared on the left side (where it currently is), center position, or right positon.  Please see the attached screen shot.  Is there a way I can force the datasheet to come up in a certain location in the window?
    I am using New Report VI from the Report Generation VI Toolkit and have the window state set at normal. 
    metzler CLAD
    Attachments:
    Excel file screen location.docx ‏365 KB

    Metzler:
    There isn't currently a method for controlling the sub-window size/position for a file within Excel. It might be possible through ActiveX, but I'm not entirely sure.
    That would, however, make an excellent product suggestion for the LabVIEW Idea Exchange.
    Caleb Harris
    National Instruments | Mechanical Engineer | http://www.ni.com/support

  • Can't open .dmg files, says its "not recognized"

    I have recently tried to mount a .dmg file but a dialogue box will always open, saying that the disk was "not recognized".
    I've already checked "From anywhere" under "System Preferences/Security and Privacy/Allow applications downloaded from", so there should be no problem with downloading a .dmg file off the internet, right?
    The .dmg is an Adobe Extensions Manager CS4. I'm using a Macbook Pro with OS X 10.8, and yes I already know that particular extension manager is not for this operating system, but this has already happened with a 10.8 version as well.

    If you right click on the dmg can you open it? 
    Use Software Update or the OS 10.8.3 combo update to update your OS.  Also, update everything SU has to offer for your computer.  When done, repair permissions and restart your computer.

  • Opening a file with its filename from a servlet- avoid buffer to cach files

    Hi,
    I am building an URL with the following code and calling that particular file from this servlet using request dispatcher. When I am geting alcCode from getParameter method then it is not caching the pages
    but when I am geting the same through a session value it starts caching the page after cirtain number of requests and shows up the previously requested file.
    I guess it is because it always names the file with the package name.
    for example if my package is sree then the file opened is named as
    sree[1].pdf. Please help me solve this problem
    alcCode = req.getParameter("alcList");
    HttpSession userSession= req.getSession(false);//if request is from //submit action from a FORM
    String alcCode;
    alcCode = req.getParameter("alcList");
    System.out.println("request.getparameter alcCode "+alcCode);
    if (alcCode==null){
    alcCode= (String) userSession.getValue("alcCode");
    //else get the alc code from the session that has been stored
    Calendar todaysDate=Calendar.getInstance();
    int selectMonth=todaysDate.get(Calendar.MONTH);
    int selectYear=todaysDate.get(Calendar.YEAR);
    if(selectMonth <10)
    //selectMonth = InvoiceDate.substring(1,i-8);
    urlPdf="/reports/RPTS"+selectYear+"0"+selectMonth+"/PDF-FORMAT/E"+selectYear+"0"+selectMonth+"_"+alcCode+".PDF";
    }else{
    urlPdf="/reports/RPTS"+selectYear+selectMonth+"/PDF-FORMAT/E"+selectYear+selectMonth+"_"+alcCode+".PDF";
    res.setContentType("application/pdf");
    res.reset();
    res.resetBuffer();
    res.setHeader("Content-disposition","attachment; filename" +urlPdf );
    System.out.println(urlPdf);
    try{
    ServletContext sc = getServletContext();
    RequestDispatcher rd = sc.getRequestDispatcher(urlPdf);
    rd.forward(req, res);
    Thanks in advance.
    -Sreekanth Varidhireddy                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                   

    I had a similar problem when I used the attachment argument to the Content-Disposition header.
    try replacing this:
    res.setHeader("Content-disposition","attachment; filename" +urlPdf );
    with this:
    res.setHeader("Content-Disposition","inline; filename=" +urlPdf );
    /Niklas

  • HT1349 I installed a game into my iMac. Nothing popped up to install it. What do i need to open to find where its located to manually install?

    I want to download a game I bought that's a disc. Once I put the disc in, nothing popped up. Where do I have to go to manually download it?

    For your storage stuff, see Pondini's guide.
    Once you sort that out, see:
    these:
    Switching from Windows to Mac OS X,
    Basic Tutorials on using a Mac,
    Mac OS X keyboard shortcuts,
    Anatomy of a Mac,
    MacTips,
    Switching to Mac Superguide, and
    Switching to the Mac: The Missing Manual, Lion Edition.
    Additionally, *Texas Mac Man* recommends:
    Quick Assist,
    Welcome to the Switch To A Mac Guides,
    Take Control E-books, and
    A guide for switching to a Mac.

  • Hi. I'm getting a message adobe reader could not open the file because its either not a supported file type or because the file has been damaged. Any ideas what to do please? thank you

    Does anyone had the same problem?

    ednaroddy wrote:
    Does anyone had the same problem?
    If you search the forum you will find that the same problem is posted multiple times every day.
    You will also find that the reply is always the same: see http://helpx.adobe.com/acrobat/kb/pdf-error-1015-11001-update.html

  • Protected mode message comes up and when I try to open files it says it encountered an error and to check online.. i can not open any files now

    Within the past week I have been getting messages when trying to open pdf files " that its in protected mode and can not open"
    I deleted adobe and reinstalled directly from Adobe.com and now I can not open any file with a message it has encountered an error
    and will check online for solution. Please assist as no files will open now
    This is details of error
    Problem Event Name:    APPCRASH
      Application Name:    AcroRd32.exe
      Application Version:    11.0.10.32
      Application Timestamp:    547e9779
      Fault Module Name:    StackHash_147f
      Fault Module Version:    0.0.0.0
      Fault Module Timestamp:    00000000
      Exception Code:    c000041d
      Exception Offset:    77a011f1
      OS Version:    6.1.7601.2.1.0.256.48
      Locale ID:    1033
      Additional Information 1:    147f
      Additional Information 2:    147ff66574b08dc93180d912e60eb897
      Additional Information 3:    c48b
      Additional Information 4:    c48be403c52ec6c06778481aaa8948d8
    Read our privacy statement online:
      http://go.microsoft.com/fwlink/?linkid=104288&clcid=0x0409
    If the online privacy statement is not available, please read our privacy statement offline:
      C:\Windows\system32\en-US\erofflps.txt

    Can you open Adobe Reader by itself?  If so, try to disable Protected Mode [Edit | Preferenes | Security (Enhanced)].

  • Open a file from oracle report

    Hi everyone,
    I need your help, i have a report and there is a field which is the location of a file. the report is generated in pdf and the location of the file is a link and user can click on it. But when the report and files related to the links are copied in another location, the links in the report do not open the file, is there a way to have like a dynamic process, so if the report and the files location change, link can continue to open the file in current location.
    I hope you can understand my problem
    Thanks.

    If your LINK is fixed, it may open from other location. BUT as per my knowledge NOT POSSIBLE.
    Have a Look Oracle Application Development: How to Make Drill Down (Hyperlink) Report in Oracle Reports 10g/11g?
    Hope get an idea.
    Hamid.

  • Opening PDF File in CS5

    In CS5, is there a way to open a PDF file, but have each page either saved as a seprate file in a selected directory (like in a batched action or similar) vs. opening each file as its own separate PS file?  In opening PDF files with over a hundred pages, the system crashes after only two pages, and processing them one page at a time would be extremely time-consuming.

    Try the PDF Processor script:
    ( works in cs5 and goes in the cs5>Presets>Scripts folder
      and then listed under File>Scripts in photoshop)
    http://www.ps-scripts.com/bb/viewtopic.php?f=10&t=1882&sid=26a26e41a37b78db4b39c1cd933bdd7 f
    MTSTUNER

  • NavigateToURL() not working when trying to open a file.

    Hi,
    I am working on an AIR Flex application running on the local Windows system.
    Following code works when accessing the file from my local system.
    I want to display a file which is present in a remote server.
    In ActionScript, The below code does NOT work.
    var url:String = "\\<RemoteServerName>\d1\abc.pdf";
    var   request:URLRequest = new URLRequest(url);  
    flash.net.navigateToURL(request,
    "_blank");
    When I am trying to open the file manually, e.g. Start -> Run -> Open (\\<RemoteServerName>\d1\abc.pdf), the document opens fine.
    Please let me know if there are any other way of opening a file from remote location.
    Thank You,
    Sway

    Thanks rkewlani,
    I think I am geting closer for a solution though I am getting a new error after changing the URL.
    My new url:String looks like
    var url:String = file:\\RemoteServerName\d1\abc.pdf;
    var  request:URLRequest = new URLRequest(url);
    flash.net.navigateToURL(request,"_blank");
    Error I get is :
    SecurityError: Error #2121: Security sandbox violation: navigateToURL: app:/XXX.swf cannot access file:\\RemoteServerName\d1\abc.pdf;. This may be worked around by calling Security.allowDomain.
    I added Security.allowDomain("*") to the creationComplete event of the form, Now the error is
    SecurityError: Error #3207: Application-sandbox content cannot access this feature.
    at flash.system::Security$/allowDomain()
    Any help on this.
    Thanks,
    Sway 

Maybe you are looking for

  • Table for Ship to Party for Tcode VA03

    hii Experts, Can anyone plz tell me the Table for Ship to Party (kunnr) corresponding to VBELN? Regards, Apoorv

  • Goepel PXI-3220 not visible in MAX

    I have installed 2 goepel pxi-3220 cards into a NI PXI-chassis. But there arent visible in MAX. The drivers in the windows device manager are present and working fine. I would like to have these two cards visible in MAX. Does anyone have any experien

  • Flash.filesystem not found

    Hi, i just install Flex builder 3, and i want to create files, but i dont have le pachage flash.filesystem nor class File. can you please tell me where can found it or where can i download it? thanks.

  • Need more hard drive space.  Help with install WD My Book Studio 1TB EHD.

    My MacBook Pro has no more disk space.  I'm not tech savy so I'm hesitant to install Western Digital My Book Studio 1TB purchased.  I read somewhere not to install the smartware that comes with this external drive because it might cause problems when

  • Processing "Items" Using Workflow

    If a work "item" is created in a notification, can the system automatically notify the person or department responsible via the SAP Business Workflow that an item needs to be processed? I know that tasks can be processed via workflow, but have not be