Get path and file name from Bfile

Hi,
I'm using Bfile to store images in a database. Is there a way to get the path and file name of the image from Bfile, because I need to pass that information into an image processing function.
Many thanks.
Sheldon

Can you use FILEISOPEN in the DBMS_LOB package?
See http://download-west.oracle.com/docs/cd/B10501_01/appdev.920/a96591/adl03prg.htm#281893
-- CJ

Similar Messages

  • Path and file name problem when I want to download files from html

    Hi all,
    I want to write a small program to allow users download files from jsp file
    but the following files don't work .
    <%@ page language="java" import="java.net.*,java.io.*"%>
    <%@ page import ="java.util.*"%>
    <%
    try
    String SContent = request.getParameter("click");
    String SDocName = "temp.doc"; //  out put file File Name
    ServletOutputStream stream= response.getOutputStream(); // Getting ServletOutputStream
    response.setContentType("application/msword"); // Setting content type
    response.setHeader("Content-disposition","attachment;filename=\"" +SDocName+"\""); // To pop dialog box
    BufferedInputStream in = new BufferedInputStream(new FileInputStream(SContent));
    int c;
    while ((c = in.read()) != -1){
               stream.write(c);
    in.close();
    stream.flush();
    catch(final IOException e)
    System.out.println ( "IOException." );
    catch(Exception e1)
    System.out.println ( "Exception." );
    %>I am so confuse, what is the path and file name I sould give ? for example my click should equal to http://******/Test/display.jsp?click=00-1

    Hi all,
    I got error at
    java.lang.IllegalStateException: getOutputStream() has already been called for this response
         org.apache.coyote.tomcat5.CoyoteResponse.getWriter(CoyoteResponse.java:599)
    if I want ot download file from html file.
    String SContent = request.getParameter("click");
    if I hard code like follow it work fine.
    String SContent ="C:/Project Coding.doc";
    what mistake I make.
    Thank you!

  • Need script to add path and file name to fillable  form

    I have a fillable pdf form that I would like to have a script that adds the path and file name to the form. This script would be in a field at the end of the document.
    I am a newbie to javascript and formcalc. The script will be the only one in the form.
    Thanks for any assistance.
    Lisa

    Hi,
    I have a sample that attach a file to the PDF and write in a text field the file name. I don´t know how to get the full path and it only works in Acrobat. To work in Adobe Reader is necessary the LC Reader Extensions to give some special permissions to the document. But, regard this, you still want the sample send me a email to [email protected]
    Best Regards,

  • Max length of VI file paths and file names

    Hi,
    Is there a maximum allowed length of VI file paths and file names in LabVIEW? I'm running LV 6.0.2i on NT and is trying to save a VI inside a LLB and LabVIEW crashes each time. I have also tried to copy the VI from the LLB to a temp folder with the Librarian VI, but LabVIEW crashes as well. The total length of the file path is around 260 characters and I strongly suspect the file path length in combination with LLB because when I use a shorter path the problem disappear. If I use a long path without LLB (just regular VIs) a warning appear "Invalid file name" instead of LabVIEW crashing.
    Does anybody know the solution to this problem or must I use shorter filepaths? Perhaps it depends on which platform I am running
    LV on?
    Sincerely,
    Mattias Ericsson

    "Mattias Ericsson" wrote in message
    news:[email protected]..
    > Hi,
    >
    > Is there a maximum allowed length of VI file paths and file names in
    > LabVIEW? I'm running LV 6.0.2i on NT and is trying to save a VI inside
    > a LLB and LabVIEW crashes each time. I have also tried to copy the VI
    > from the LLB to a temp folder with the Librarian VI, but LabVIEW
    > crashes as well. The total length of the file path is around 260
    > characters and I strongly suspect the file path length in combination
    > with LLB because when I use a shorter path the problem disappear. If I
    > use a long path without LLB (just regular VIs) a warning appear
    > "Invalid file name" instead of LabVIEW crashing.
    >
    > Does anybody know the solution to
    this problem or must I use shorter
    > filepaths? Perhaps it depends on which platform I am running LV on?
    I believe windows has a 255 character pathname (file+path) limit. We once
    had that problem because we had a long filename and a longer pathname.
    Moved the directory up a couple levels and problem solved.

  • Definnig logical path and file names

    hallow experts,
    i wont to now about definnig logical path and file names,
    did some one have something that can help me in that
    regards

    Hi Rodrigo,
    Have a look at this link... i guess it explains what you are looking for...
    http://help.sap.com/saphelp_47x200/helpdata/en/8d/3e4ec2462a11d189000000e8323d3a/content.htm
    regards,
    Naveen

  • Path and file name

    I am running Illustrator CS4 on Windows XP.
    I have obtained a script that inserts the file name in the bottom left of the page
    // CODE BEGIN
    var pointTextRef = app.activeDocument.textFrames.add();
    pointTextRef.contents = app.activeDocument.name;
    pointTextRef.top = 20;
    pointTextRef.left = 10;
    // CODE END
    What I would like is that it inserts the path name as well ie
    "c:\temp\file.ai"
    rather than just the file name "file.ai"
    Is there anyone out there who can help me.
    Thank You

    Hi Mark,
    Thank you for this script.
    It works fine, just as I wanted.
    Much appreciated.
    Cheers
    Eddie Frankel
    Technical Officer
    Department of Primary Industries
    55 Collins Street
    Melbourne
    GPO Box 4440
    Melbourne
    Vic. 3001
    Phone: 03 9 658 4539
    Fax: 03 9 658 4555
    Email: [email protected]
    This e-mail and any attachments may contain information that is
    confidential, legally
    privileged and/or copyright. If you are not the intended recipient, any
    use, disclosure
    distribution or reliance on the information contained in this e-mail is
    unauthorised.
    You should only re-transmit or distribute the information if you are
    authorised to do so.
    If you have received this e-mail in error please notify the Department of
    Primary Industries
    by return e-mail and destroy all copies printed or held on any computer.
    DPI does not warranty that this e-mail and any attachments are free of
    viruses.
    Muppet Mark <[email protected]>
    02/10/2009 09:25 PM
    Please respond to
    [email protected]
    To
    eddie frankel <[email protected]>
    cc
    Subject
    path and file name
    I think you want is 'fullName'
    var docRef = app.activeDocument
    var pointTextRef = docRef.textFrames.add();
    pointTextRef.contents = docRef.name + '  ' + docRef.fullName;
    pointTextRef.top = 20;
    pointTextRef.left = 10;

  • Path and File name of the attachment

    Hello Srm Guys,
    Where should be the Path and File name of the attachment are stored for a shopping card Item.
    Thanks
    Ram

    Hello Ram,
    Execute the function module BBP_PROCDOC_ITEM_GETDETAIL by providing the item guid,object type . Now it will populate the  et_attach importing parameter with the attatchement details.
    In the ET_ATTATCH internal table , the field PHIO_FNAME/PHIO_PATH_FILE provides the physical storage location of the document.
    Hope this info will be helpful.
    Regards,
    Mani

  • How to get list of file names from a directory?

    How to get list of file names from a directory?
    Please help

    In addition, this:
    String filename = files;Should be this:
    String filename = files;
    That's just because he didn't use the "code" tags, so [ i ] made everything following it become italicized.                                                                                                                                                                                                                                                                                                                                                                                                                                                                           

  • How to get the target file name from an URL?

    Hi there,
    I am trying to download data from an URL and save the content in a file that have the same name as the file on the server. In some way, what I want to do is pretty similar to what you can do when you do a right click on a link in Internet Explorer (or any other web browser) and choose "save target as".
    If the URL is a direct link to the file (for example: http://java.sun.com/images/e8_java_logo_red.jpg ), I do not have any problem:
    URL url = new URL("http://java.sun.com/images/e8_java_logo_red.jpg");
    System.out.println("Opening connection to " + url + "...");
    // Copy resource to local file                   
    InputStream is = url.openStream();
    FileOutputStream fos=null;
    String fileName = null;
    StringTokenizer st=new StringTokenizer(url.getFile(), "/");
    while (st.hasMoreTokens())
                    fileName=st.nextToken();
    System.out.println("The file name will be: " + fileName);
    File localFile= new File(System.getProperty("user.dir"), fileName);
    fos = new FileOutputStream(localFile);
    try {
        byte[] buf = new byte[1024];
        int i = 0;
        while ((i = is.read(buf)) != -1) {
            fos.write(buf, 0, i);
    } catch (Throwable e) {
        e.printStackTrace();
    } finally {
        if (is != null)
            is.close();
        if (fos != null)
            fos.close();
    }Everything is fine, the file name I get is "e8_java_logo_red.jpg", which is what I expect to get.
    However, if the URL is an indirect link to the file (for example: http://javadl.sun.com/webapps/download/AutoDL?BundleId=37719 , which link to a file named JavaSetup6u18-rv.exe ), the similar code return AutoDL?BundleId=37719 as file name, when I would like to have JavaSetup6u18-rv.exe .
    URL url = new URL("http://javadl.sun.com/webapps/download/AutoDL?BundleId=37719");
    System.out.println("Opening connection to " + url + "...");
    // Copy resource to local file                   
    InputStream is = url.openStream();
    FileOutputStream fos=null;
    String fileName = null;
    StringTokenizer st=new StringTokenizer(url.getFile(), "/");
    while (st.hasMoreTokens())
                    fileName=st.nextToken();
    System.out.println("The file name will be: " + fileName);
    File localFile= new File(System.getProperty("user.dir"), fileName);
    fos = new FileOutputStream(localFile);
    try {
        byte[] buf = new byte[1024];
        int i = 0;
        while ((i = is.read(buf)) != -1) {
            fos.write(buf, 0, i);
    } catch (Throwable e) {
        e.printStackTrace();
    } finally {
        if (is != null)
            is.close();
        if (fos != null)
            fos.close();
    }Do you know how I can do that.
    Thanks for your help
    // JB
    Edited by: jb-from-sydney on Feb 9, 2010 10:37 PM

    Thanks for your answer.
    By following your idea, I found out that one of the header ( content-disposition ) can contain the name to be used if the file is downloaded. Here is the full code that allow you to download locally a file on the Internet:
          * Download locally a file from a given URL.
          * @param url - the url.
          * @param destinationFolder - The destination folder.
          * @return the file
          * @throws IOException Signals that an I/O exception has occurred.
         public static final File downloadFile(URL url, File destinationFolder) throws IOException {
              URLConnection urlC = url.openConnection();
              InputStream is = urlC.getInputStream();
              FileOutputStream fos = null;
              String fileName = getFileName(urlC);
              destinationFolder.mkdirs();
              File localFile = new File(destinationFolder, fileName);
              fos = new FileOutputStream(localFile);
              try {
                   byte[] buf = new byte[1024];
                   int i = 0;
                   while ((i = is.read(buf)) != -1) {
                        fos.write(buf, 0, i);
              } finally {
                   if (is != null)
                        is.close();
                   if (fos != null)
                        fos.close();
              return localFile;
          * Returns the file name associated to an url connection.<br />
          * The result is not a path but just a file name.
          * @param urlC - the url connection
          * @return the file name
          * @throws IOException Signals that an I/O exception has occurred.
         private static final String getFileName(URLConnection urlC) throws IOException {
              String fileName = null;
              String contentDisposition = urlC.getHeaderField("content-disposition");
              if (contentDisposition != null) {
                   fileName = extractFileNameFromContentDisposition(contentDisposition);
              // if the file name cannot be extracted from the content-disposition
              // header, using the url.getFilename() method
              if (fileName == null) {
                   StringTokenizer st = new StringTokenizer(urlC.getURL().getFile(), "/");
                   while (st.hasMoreTokens())
                        fileName = st.nextToken();
              return fileName;
          * Extract the file name from the content disposition header.
          * <p>
          * See <a
          * href="http://www.w3.org/Protocols/rfc2616/rfc2616-sec19.html">http:
          * //www.w3.org/Protocols/rfc2616/rfc2616-sec19.html</a> for detailled
          * information regarding the headers in HTML.
          * @param contentDisposition - the content-disposition header. Cannot be
          *            <code>null>/code>.
          * @return the file name, or <code>null</code> if the content-disposition
          *         header does not contain the filename attribute.
         private static final String extractFileNameFromContentDisposition(
                   String contentDisposition) {
              String[] attributes = contentDisposition.split(";");
              for (String a : attributes) {
                   if (a.toLowerCase().contains("filename")) {
                        // The attribute is the file name. The filename is between
                        // quotes.
                        return a.substring(a.indexOf('\"') + 1, a.lastIndexOf('\"'));
              // not found
              return null;
         }

  • Getting links and its names from a html file

    Hi everyone
    My problem about the a getting links with name from a html file. For example
    &#304;n a web page in this site ?SUN? when use click SUN the browser open http://java.sun.com
    &#304; want both of them, so the links and name. I can succeeded the get link but i don t know how to get the link name.
    For example :
    <B>setRightComponent(Component)</B>
    &#304;n this code segment i want to get B tag. But how i don t know. To get A tag i used this code
    List result = new ArrayList();
    try {
    // Create a reader on the HTML content
    URL url = new URI(uriStr).toURL();
    URLConnection conn = url.openConnection();
    Reader rd = new InputStreamReader(conn.getInputStream());
    // Parse the HTML
    EditorKit kit = new HTMLEditorKit();
    HTMLDocument doc = (HTMLDocument)kit.createDefaultDocument();
    kit.read(rd, doc, 0);
    // Find all the A elements in the HTML document
    HTMLDocument.Iterator it = doc.getIterator(HTML.Tag.A);
    while (it.isValid()) {
    SimpleAttributeSet s = (SimpleAttributeSet)it.getAttributes();
    String link = (String)s.getAttribute(HTML.Attribute.HREF);
    if (link != null) {
    result.add(link);
    it.next();
    &#304; can use B tag but i don t know hot to get its value because it has no prefix such as HREF....
    i am sorry if i use a bad explanation style or incorrect word.

    import java.io.*;
    import java.net.*;
    import javax.swing.text.*;
    import javax.swing.text.html.*;
    class GetLinks
        public static void main(String[] args)
            throws Exception
            // Create a reader on the HTML content
            Reader reader = getReader( args[0] );
            // Parse the HTML
            EditorKit kit = new HTMLEditorKit();
            HTMLDocument doc = (HTMLDocument)kit.createDefaultDocument();
            doc.putProperty("IgnoreCharsetDirective", Boolean.TRUE);
            kit.read(reader, doc, 0);
            // Find all the A elements in the HTML document
            HTMLDocument.Iterator it = doc.getIterator(HTML.Tag.A);
            while (it.isValid())
                SimpleAttributeSet s = (SimpleAttributeSet)it.getAttributes();
                String href = (String)s.getAttribute(HTML.Attribute.HREF);
                int start = it.getStartOffset();
                int end = it.getEndOffset();
                String text = doc.getText(start, end - start);
                System.out.println( href + " : " + text );
                it.next();
        // If 'uri' begins with "http:" treat as a URL,
        // otherwise, treat as a local file.
        static Reader getReader(String uri)
            throws IOException
            // Retrieve from Internet.
            if (uri.startsWith("http:"))
                URLConnection conn = new URL(uri).openConnection();
                return new InputStreamReader(conn.getInputStream());
            // Retrieve from file.
            else
                return new FileReader(uri);
    }

  • How do I remove OSX/FkCodec-A  from my Mac mini? I am running Yosemite and the path and file name is /Volumes/macvexe/macvexe.app/Contents/MacOS/mac.installer. Sophos was unble to remove and it will not go to trash.

    Sophos found this on my mac mini (early 2009) - OSX/FkCodec-A and could not clean it up. I am running Yosemite 10.10 and the path and filename for this Trojan is   /Volumes/macvexe/macvexe.app/Contents/MacOS/mac.installer. Could someone please tell me how to get rid of it as Sophos is unable to remove and Trash can remove it.

    outdoor,
    How did you originally install iWork on the Mac Pro?  was it preinstalled?  The machine seems old enough that you should have an original install DVD that came with the mac pro.
    Amazon has the install DVDs for iWork '09:
    http://www.amazon.com/s/ref=nb_sb_noss_1?url=search-alias%3Daps&field-keywords=i Work+%2709
    To move tables between sheets you can select the table, copy, then paste after activating (by clicking) the destination sheet.  If you really mean move, then use the cut command (rather than copy).
    To copy... use the menu item "Edit > Copy"
    To cut... use the menu item "Edit > Cut"
    Then paste in the destination

  • Insert a directory path and file name option

    I built a program that runs three tasks when a voltage triggers the data acquisition. I would like now to insert an option/control for two issues: selection of the directory where the data will be saved, and selection of the file name. How can I do this such that after I press 'start' I should be asked which is the directory where I want the data to be saved and then what is the file name?
    Another option would be the following: After I press 'Start' I will have a control where I can write or browse for the folder where I want to save the data; then I have another controller where I write the new file name. So in this case I should not be prompted except the case when I am trying to use the same file name.
    Where should I con
    nect this new subvi in my loop - before the tasksand before the trigger, or after the tasks and before the trigger?
    Thank you.

    Programming with LabVIEW might be fun but it is quite time consuming�
    OK, here is what I want to do.
    I have to monitor a machining process. I have to record cutting forces, power consumed, vibrations, and temperature. From each of these sensors I get a voltage as output and I used �Measurement and automation� and NI-DAQmx to program my tasks (I have LabVIEW Express running in Windows XP).
    The triggering of DAQ is generated by the input of a 4.5V DC when the CNC program starts; the stop occurs when CNC program ends and the output voltage becomes 0V. I have finished all the connections and now I have to build the vi.
    The �small picture� could be described this way:
    I want to record the parameters and save them in files that I could process later using specific vi.
    The �big picture� would be the following:
    I would like to build a stand alone program that will do the following: when I run the program [ i. e. double-click the shortcut (or the file)] a panel should come up in the center of the screen � in this panel I would like to be able to select what process am I going to investigate: grinding, turning, milling, drilling, tapping etc.
    Once I selected what process I am going to investigate, the front panel of a vi should come up � In this panel I should be able to select what parameters I am going to record: forces, power, vibrations, and temperature. On the front panel I should be able to see the waveform of the acquired data. A start/stop button and a led green/red for each parameter should show me the status of the acquisition (green is on, red is off). The start/stop button should allow me to �manually� start or stop the program at any time. Additionally, on the front panel I should also have icons with a choice for directory (folder) path, file name, and comments regarding the experiment. The date and time should be recorded in the file that is saved. There should be an option (check box or selection icon) for saving the data in binary or ASCII format.
    Similar to any program, the front panel should have a toolbar containing File, Operate and Help options. The File option should contain �Clear graphs�, �Setup DAQ� and �Exit� and the Operate option should contain: Use digital alarm, Use digital trigger, and Write data to disk with the option to be selected or deselected. The main front panel should close when I select File -> Exit.
    The File -> Setup DAQ selection should bring up another front panel in which I should be able to see the acquisition control panel (device, channels to get, buffer size, units � English or metric) and the calibration factors (for the tasks, including triggering voltage) including sampling rate.
    Well, that�s almost all. I understand I cannot do this all at once. Unfortunately, I have a very close due date in getting the system up and ready. I am hoping that I could get some help setting up a simple program and I could develop the rest step by step later...
    Can anybody help me with this program? I have attached a first attempt that would allow automatic triggering and stopping as well as displaying of forces, power and acceleration.
    Thank you in advance.
    Radu
    Attachments:
    Acq_Graph_Voltage-Int_Clk-Dig_Start_Ref_TRIAL1.vi ‏201 KB

  • How to get the long file name from an 8.3 name in Windows.

    Because of a legacy string limitation, I have a list of files in 8.3 format. The actual files are saved with long names. How can I get the long name from the short name?
    In JavaScript, I would get a file system object and get the file object from there with the short name. Then it's no problem to get the full name. But I don't see anything in Java that matches that. ???
    Ideas?
    Frank Perry, MSEE

    Here is what I did.
    String displayName = "somefi~1.txt";
    File fO = new File("c:\\"); // I have a more involved path but that's not important here.
    String stPath = fO.getPath() + displayName;
    File fD = new File(stPath); // get the file using the short name.
    File fDc = new File(fD.getCanonicalPath()); // get another file using the cononical name
    String FulldisplayName = fDc.getName(); // get the long name from there.
    It's roundabout but it works. Since getName() on the file read with the short name only returns the name used to get the file, I open it twice. The alternative is to parse the cononical name for the file name but that's clumbsy too.
    Frank

  • Logical Path and File Name

    Hi Everybody,
    How could I check the actual value of 2 variables which I defined with transaction \nFILE for the Logical Path and the logical file name?
    Background to this question is that I am experiencing problems in using them and want to check if the variables have correct values.....
    Thanks in advance
    FedeX.

    Hi FedeX,
    Did not get exactly what you wanted.
    May be you can try this: You can check the varibale values in the table V_PARAMVAL.
    Bye
    Dinesh

  • Regarding the Logical Path and file name

    Hi all ,
    I am using LSMW for creating  the BOM of a material .
    I am getting problem at step 7 , saying the logical path is pointing to physical directory .
    Then i did some R & D . I created the logical path and logical file name using transaction FILE . Then i got the physical path using FM file_get_name.
    But when i give those logical path and logical file names , still i am getting prob.... at step 7 of lsmw.
    Pls let me know . I did my best unti l now ....
    Regards

    Hi Raj,
    Can you send the Error which you got at Step 7??
    It would be of great help if you can send the File Path and the file names you have used.
    Regards,
    -Syed.

Maybe you are looking for